summaryrefslogtreecommitdiffstats
path: root/fortune/strfile/strfile.c
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2000-01-13 16:22:10 +0000
committerjsm <jsm@NetBSD.org>2000-01-13 16:22:10 +0000
commit31f3bac6b88bfb55f83358b8a827924631f828ea (patch)
tree6e665494446134137ff213e39b1e58f752399ae2 /fortune/strfile/strfile.c
parent5c8c80051cbc9a51e43e68a907b302554f905b96 (diff)
downloadbsdgames-darwin-31f3bac6b88bfb55f83358b8a827924631f828ea.tar.gz
bsdgames-darwin-31f3bac6b88bfb55f83358b8a827924631f828ea.tar.zst
bsdgames-darwin-31f3bac6b88bfb55f83358b8a827924631f828ea.zip
Remove unnecessary casts, and add necessary ones for printf arguments.
Diffstat (limited to 'fortune/strfile/strfile.c')
-rw-r--r--fortune/strfile/strfile.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fortune/strfile/strfile.c b/fortune/strfile/strfile.c
index deb43b55..ba35de82 100644
--- a/fortune/strfile/strfile.c
+++ b/fortune/strfile/strfile.c
@@ -1,4 +1,4 @@
-/* $NetBSD: strfile.c,v 1.18 2000/01/13 16:20:27 jsm Exp $ */
+/* $NetBSD: strfile.c,v 1.19 2000/01/13 16:22:10 jsm Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -47,7 +47,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\n\
#if 0
static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: strfile.c,v 1.18 2000/01/13 16:20:27 jsm Exp $");
+__RCSID("$NetBSD: strfile.c,v 1.19 2000/01/13 16:22:10 jsm Exp $");
#endif
#endif /* not lint */
#endif /* __NetBSD__ */
@@ -101,9 +101,9 @@ __RCSID("$NetBSD: strfile.c,v 1.18 2000/01/13 16:20:27 jsm Exp $");
# define ALLOC(ptr,sz) do { \
if (ptr == NULL) \
- ptr = malloc((unsigned int) (CHUNKSIZE * sizeof *ptr)); \
+ ptr = malloc(CHUNKSIZE * sizeof *ptr); \
else if (((sz) + 1) % CHUNKSIZE == 0) \
- ptr = realloc((void *) ptr, ((unsigned int) ((sz) + CHUNKSIZE) * sizeof *ptr)); \
+ ptr = realloc(ptr, ((sz) + CHUNKSIZE) * sizeof *ptr); \
if (ptr == NULL) \
die("out of space"); \
} while (0)
@@ -246,9 +246,9 @@ main(ac, av)
puts("There was 1 string");
else
printf("There were %d strings\n", (int)(Num_pts - 1));
- printf("Longest string: %lu byte%s\n", Tbl.str_longlen,
+ printf("Longest string: %lu byte%s\n", (unsigned long)Tbl.str_longlen,
Tbl.str_longlen == 1 ? "" : "s");
- printf("Shortest string: %lu byte%s\n", Tbl.str_shortlen,
+ printf("Shortest string: %lu byte%s\n", (unsigned long)Tbl.str_shortlen,
Tbl.str_shortlen == 1 ? "" : "s");
}