Module Name:    src
Committed By:   dholland
Date:           Thu Aug 27 00:42:11 UTC 2009

Modified Files:
        src/games/fortune/fortune: fortune.c

Log Message:
Use correct type for malloc sizes (size_t, not unsigned)


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/games/fortune/fortune/fortune.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/games/fortune/fortune/fortune.c
diff -u src/games/fortune/fortune/fortune.c:1.53 src/games/fortune/fortune/fortune.c:1.54
--- src/games/fortune/fortune/fortune.c:1.53	Thu Aug 27 00:40:44 2009
+++ src/games/fortune/fortune/fortune.c	Thu Aug 27 00:42:11 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: fortune.c,v 1.53 2009/08/27 00:40:44 dholland Exp $	*/
+/*	$NetBSD: fortune.c,v 1.54 2009/08/27 00:42:11 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1986, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)fortune.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: fortune.c,v 1.53 2009/08/27 00:40:44 dholland Exp $");
+__RCSID("$NetBSD: fortune.c,v 1.54 2009/08/27 00:42:11 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -130,11 +130,11 @@
 static int add_file(int,
 	    const char *, const char *, FILEDESC **, FILEDESC **, FILEDESC *);
 static void all_forts(FILEDESC *, const char *);
-static char *copy(const char *, u_int);
+static char *copy(const char *, size_t);
 static void rot13(char *line, int len);
 static void display(FILEDESC *);
 static void do_free(void *);
-static void *do_malloc(u_int);
+static void *do_malloc(size_t);
 static int form_file_list(char **, int);
 static int fortlen(void);
 static void get_fort(void);
@@ -879,7 +879,7 @@
 static char *
 copy(str, len)
 	const char	*str;
-	unsigned int	len;
+	size_t	len;
 {
 	char	*new, *sp;
 
@@ -896,8 +896,7 @@
  *	Do a malloc, checking for NULL return.
  */
 static void *
-do_malloc(size)
-	unsigned int	size;
+do_malloc(size_t size)
 {
 	void	*new;
 

Reply via email to