summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-09-03 13:56:57 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-09-03 13:56:57 +0000
commit90562873806dad0660901e9b9d25801343dd0af8 (patch)
tree29a2ab2cc7f9e32d01db7f40795a0780e54479e0 /usr.bin
parentab7101aae5f2f063c2070986eab3aff47b463714 (diff)
use calloc() for the sake of regularity, prompted by deraadt@
Note that I *still* fill every pointer with explicit NULL, for portability. filling with 0 bytes is not necessarily the same as NULL pointers.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/generate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/generate.c b/usr.bin/make/generate.c
index e713533513b..3841756b017 100644
--- a/usr.bin/make/generate.c
+++ b/usr.bin/make/generate.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: generate.c,v 1.7 2007/07/08 17:44:20 espie Exp $ */
+/* $OpenBSD: generate.c,v 1.8 2007/09/03 13:56:56 espie Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
@@ -112,7 +112,7 @@ main(int argc, char *argv[])
t = table[tn-1];
slots = atoi(argv[2]);
if (slots) {
- occupied = malloc(sizeof(char *) * slots);
+ occupied = calloc(sizeof(char *), slots);
if (!occupied)
exit(1);
for (i = 0; i < slots; i++)