From 33ca41e29f036306f91b69bc1b2938e8449b4a4f Mon Sep 17 00:00:00 2001 From: Hiten Pandya Date: Sun, 1 May 2005 03:01:20 +0000 Subject: [PATCH] Use reallocf(3) and cleanup some NULL checks. --- test/pcpu/ncache-stats.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/pcpu/ncache-stats.c b/test/pcpu/ncache-stats.c index 734b687b7e..3653c2f0a8 100644 --- a/test/pcpu/ncache-stats.c +++ b/test/pcpu/ncache-stats.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/test/pcpu/ncache-stats.c,v 1.5 2005/03/07 04:34:11 hmp Exp $ + * $DragonFly: src/test/pcpu/ncache-stats.c,v 1.6 2005/05/01 03:01:20 hmp Exp $ */ #include @@ -61,7 +61,7 @@ int main(void) u_long nchtotal; nch = malloc(nch_len); - if (!nch) + if (nch == NULL) exit(-1); /* retrieve the statistics */ @@ -69,8 +69,8 @@ int main(void) warn("sysctl"); exit(-1); } else { - nch = realloc(nch, nch_len); - if (!nch) + nch = reallocf(nch, nch_len); + if (nch == NULL) exit(-1); } -- 2.41.0