Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/cgdconfig one more malloc -> emalloc.



details:   https://anonhg.NetBSD.org/src/rev/a52d88a64420
branches:  trunk
changeset: 579888:a52d88a64420
user:      elric <elric%NetBSD.org@localhost>
date:      Wed Mar 30 17:17:51 2005 +0000

description:
one more malloc -> emalloc.

diffstat:

 sbin/cgdconfig/utils.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r bb56e35c6110 -r a52d88a64420 sbin/cgdconfig/utils.c
--- a/sbin/cgdconfig/utils.c    Wed Mar 30 17:10:18 2005 +0000
+++ b/sbin/cgdconfig/utils.c    Wed Mar 30 17:17:51 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: utils.c,v 1.6 2005/03/30 17:10:18 christos Exp $ */
+/* $NetBSD: utils.c,v 1.7 2005/03/30 17:17:51 elric Exp $ */
 
 /*-
  * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: utils.c,v 1.6 2005/03/30 17:10:18 christos Exp $");
+__RCSID("$NetBSD: utils.c,v 1.7 2005/03/30 17:17:51 elric Exp $");
 #endif
 
 #include <sys/param.h>
@@ -277,8 +277,7 @@
 {
        bits_t  *b;
 
-       /* XXX do some level of error checking here */
-       b = malloc(sizeof(*b));
+       b = emalloc(sizeof(*b));
        b->length = len;
        b->text = emalloc(BITS2BYTES(b->length));
        memcpy(b->text, buf, BITS2BYTES(b->length));



Home | Main Index | Thread Index | Old Index