diff options
author | 1996-08-20 17:42:33 +0000 | |
---|---|---|
committer | 1996-08-20 17:42:33 +0000 | |
commit | 69fe5f52a1c8f96a525618f12c2af5d68e290f8d (patch) | |
tree | a97e006261bb8681400291c77dc323c1065102e0 /lib/libc/stdlib/calloc.c | |
parent | Remove ANSI function delcarations and add a cfree() stub function. (diff) | |
download | wireguard-openbsd-69fe5f52a1c8f96a525618f12c2af5d68e290f8d.tar.xz wireguard-openbsd-69fe5f52a1c8f96a525618f12c2af5d68e290f8d.zip |
Cleaner.
Diffstat (limited to 'lib/libc/stdlib/calloc.c')
-rw-r--r-- | lib/libc/stdlib/calloc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/stdlib/calloc.c b/lib/libc/stdlib/calloc.c index 5b9619ced1f..a2c4f844930 100644 --- a/lib/libc/stdlib/calloc.c +++ b/lib/libc/stdlib/calloc.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: calloc.c,v 1.2 1996/08/19 08:33:27 tholo Exp $"; +static char *rcsid = "$OpenBSD: calloc.c,v 1.3 1996/08/20 17:42:33 downsj Exp $"; #endif /* LIBC_SCCS and not lint */ #include <stdlib.h> @@ -46,7 +46,8 @@ calloc(num, size) register void *p; size *= num; - if (p = malloc(size)) + p = malloc(size); + if (p) memset(p, '\0', size); return(p); } |