summaryrefslogtreecommitdiffstats
path: root/fortune/fortune/fortune.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2009-08-27 00:42:11 +0000
committerdholland <dholland@NetBSD.org>2009-08-27 00:42:11 +0000
commit53e71277479b8689147b0d02dd0a8f48d3d0f499 (patch)
tree4b12836322254615bddf40b4939f0a200558adc1 /fortune/fortune/fortune.c
parentc642ac7bae91336a91144433bcb1bfeb5c5048b6 (diff)
downloadbsdgames-darwin-53e71277479b8689147b0d02dd0a8f48d3d0f499.tar.gz
bsdgames-darwin-53e71277479b8689147b0d02dd0a8f48d3d0f499.tar.zst
bsdgames-darwin-53e71277479b8689147b0d02dd0a8f48d3d0f499.zip
Use correct type for malloc sizes (size_t, not unsigned)
Diffstat (limited to 'fortune/fortune/fortune.c')
-rw-r--r--fortune/fortune/fortune.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fortune/fortune/fortune.c b/fortune/fortune/fortune.c
index b1790e20..4e8e6ecb 100644
--- a/fortune/fortune/fortune.c
+++ b/fortune/fortune/fortune.c
@@ -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 @@ __COPYRIGHT("@(#) Copyright (c) 1986, 1993\
#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_dir(FILEDESC *);
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 @@ is_fortfile(file, datp, posp, check_for_offend)
static char *
copy(str, len)
const char *str;
- unsigned int len;
+ size_t len;
{
char *new, *sp;
@@ -896,8 +896,7 @@ copy(str, len)
* Do a malloc, checking for NULL return.
*/
static void *
-do_malloc(size)
- unsigned int size;
+do_malloc(size_t size)
{
void *new;