From 6cae4b3b38c5e8ee985025a9633858c0871527e0 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 24 Mar 2008 18:03:54 +0000 Subject: bye, bye recalloc. Bad interface for various reasons. discussed with deraadt@ and otto@ and millert@ --- usr.bin/make/job.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'usr.bin/make/job.c') diff --git a/usr.bin/make/job.c b/usr.bin/make/job.c index 2f9016f3646..f6afd59401d 100644 --- a/usr.bin/make/job.c +++ b/usr.bin/make/job.c @@ -1,5 +1,5 @@ /* $OpenPackages$ */ -/* $OpenBSD: job.c,v 1.112 2008/01/29 22:23:10 espie Exp $ */ +/* $OpenBSD: job.c,v 1.113 2008/03/24 18:03:53 espie Exp $ */ /* $NetBSD: job.c,v 1.16 1996/11/06 17:59:08 christos Exp $ */ /* @@ -713,9 +713,11 @@ prepare_pipe(struct job_pipe *p, int *fd) ofdn = howmany(largest_fd+1, NFDBITS); if (fdn != ofdn) { - output_mask = erecalloc(output_mask, fdn, + output_mask = emult_realloc(output_mask, fdn, sizeof(fd_mask)); - actual_mask = erecalloc(actual_mask, fdn, + memset(((char *)output_mask) + ofdn * sizeof(fd_mask), + 0, (fdn-ofdn) * sizeof(fd_mask)); + actual_mask = emult_realloc(actual_mask, fdn, sizeof(fd_mask)); mask_size = fdn * sizeof(fd_mask); } -- cgit v1.2.3