diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2008-03-24 18:03:54 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2008-03-24 18:03:54 +0000 |
commit | 6cae4b3b38c5e8ee985025a9633858c0871527e0 (patch) | |
tree | 47b1849351a997d444095c48d3df464bada7fea7 /usr.bin/make/job.c | |
parent | 378ab8314fdccb82083d2b67f20c23984295f9d4 (diff) |
bye, bye recalloc. Bad interface for various reasons.
discussed with deraadt@ and otto@ and millert@
Diffstat (limited to 'usr.bin/make/job.c')
-rw-r--r-- | usr.bin/make/job.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); } |