summaryrefslogtreecommitdiff
path: root/games/fortune/strfile
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2007-09-04 22:39:32 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2007-09-04 22:39:32 +0000
commit6d1005b0932de9ecfaf5efa12fbe197d37e9a44a (patch)
tree61e0b050e2789a67f4f18c178872389795697e31 /games/fortune/strfile
parent4ed2dbf887b676108cf2f0492a13d4341704391b (diff)
Some more simple malloc(n * m) -> calloc(n, m) conversions.
ok deraadt@
Diffstat (limited to 'games/fortune/strfile')
-rw-r--r--games/fortune/strfile/strfile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/games/fortune/strfile/strfile.c b/games/fortune/strfile/strfile.c
index df47c1cb8f3..3252cb87baf 100644
--- a/games/fortune/strfile/strfile.c
+++ b/games/fortune/strfile/strfile.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strfile.c,v 1.15 2007/06/26 17:51:28 moritz Exp $ */
+/* $OpenBSD: strfile.c,v 1.16 2007/09/04 22:39:31 hshoexer Exp $ */
/* $NetBSD: strfile.c,v 1.4 1995/04/24 12:23:09 cgd Exp $ */
/*-
@@ -43,7 +43,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)strfile.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: strfile.c,v 1.15 2007/06/26 17:51:28 moritz Exp $";
+static char rcsid[] = "$OpenBSD: strfile.c,v 1.16 2007/09/04 22:39:31 hshoexer Exp $";
#endif
#endif /* not lint */
@@ -88,7 +88,7 @@ static char rcsid[] = "$OpenBSD: strfile.c,v 1.15 2007/06/26 17:51:28 moritz Exp
# define ALLOC(ptr,sz) do { \
if (ptr == NULL) \
- ptr = malloc(CHUNKSIZE * sizeof *ptr); \
+ ptr = calloc(CHUNKSIZE, sizeof *ptr); \
else if (((sz) + 1) % CHUNKSIZE == 0) \
ptr = realloc((void *) ptr, ((sz) + CHUNKSIZE) * sizeof *ptr); \
if (ptr == NULL) \