summaryrefslogtreecommitdiffstats
path: root/usr.sbin/dhcpd/confpars.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2010-01-02 04:21:16 +0000
committerkrw <krw@openbsd.org>2010-01-02 04:21:16 +0000
commitd60fc4a49ba5bfd05a3b09e715a328032ca8a26c (patch)
tree4f19ae42780699a1e61c5605aae297d2b13c6448 /usr.sbin/dhcpd/confpars.c
parentcomplete the sync to 1.9.15-pre2: mostly minor fixes (diff)
downloadwireguard-openbsd-d60fc4a49ba5bfd05a3b09e715a328032ca8a26c.tar.xz
wireguard-openbsd-d60fc4a49ba5bfd05a3b09e715a328032ca8a26c.zip
Eliminate all uses of dmalloc() where the returned pointer
is checked for NULL and a specific error/warning issued. Add two such manual warning/error checks and kill those dmalloc calls. And then there were none, so kill dmalloc(). Whew.
Diffstat (limited to 'usr.sbin/dhcpd/confpars.c')
-rw-r--r--usr.sbin/dhcpd/confpars.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/dhcpd/confpars.c b/usr.sbin/dhcpd/confpars.c
index 98ad39c3ae3..f53db1c321b 100644
--- a/usr.sbin/dhcpd/confpars.c
+++ b/usr.sbin/dhcpd/confpars.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: confpars.c,v 1.17 2010/01/01 08:02:34 krw Exp $ */
+/* $OpenBSD: confpars.c,v 1.18 2010/01/02 04:21:16 krw Exp $ */
/*
* Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.
@@ -515,8 +515,7 @@ void parse_host_declaration(cfile, group)
if (!name)
return;
- host = (struct host_decl *)dmalloc(sizeof (struct host_decl),
- "parse_host_declaration");
+ host = calloc(1, sizeof (struct host_decl));
if (!host)
error("can't allocate host decl struct %s.", name);