diff options
author | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-20 17:42:34 +0000 |
---|---|---|
committer | Jason Downs <downsj@cvs.openbsd.org> | 1996-08-20 17:42:34 +0000 |
commit | 3ad14a1d331b2a81b6e1bb69ac78d172f0ba14ca (patch) | |
tree | 3ed87d0afc430659b65ec72daab2e47e5840b872 /lib | |
parent | a0a87ba93bcf0bd2f9c97048e8af67cd2cae1904 (diff) |
Cleaner.
Diffstat (limited to 'lib')
-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); } |