From a22bbe847f0ca6688f0fba09a8b9ab55a067da92 Mon Sep 17 00:00:00 2001 From: ceriel Date: Wed, 1 Mar 1989 10:00:37 +0000 Subject: [PATCH] use calloc instead of malloc, to make sure block is initialized to 0 --- mach/proto/as/comm1.h | 1 + mach/proto/as/comm7.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mach/proto/as/comm1.h b/mach/proto/as/comm1.h index 01902ddc0..9eaea9016 100644 --- a/mach/proto/as/comm1.h +++ b/mach/proto/as/comm1.h @@ -116,6 +116,7 @@ extern FILE *fftemp(); extern long atol(); extern char *mktemp(); extern char *malloc(); +extern char *calloc(); extern char *getenv(); extern char *strncpy(); diff --git a/mach/proto/as/comm7.c b/mach/proto/as/comm7.c index c1a67603a..7c976cdf0 100644 --- a/mach/proto/as/comm7.c +++ b/mach/proto/as/comm7.c @@ -198,7 +198,7 @@ small(fitsmall, gain) return(0); } if (pbittab[bitindex] == 0 && pass == PASS_1) { - if ((pbittab[bitindex] = malloc(MEMINCR)) == 0) { + if ((pbittab[bitindex] = calloc(MEMINCR, 1)) == 0) { static int w2_given; if (!w2_given) { -- 2.34.1