From b1f4da57980d4b1a93867c6163fe2551e76f8bfa Mon Sep 17 00:00:00 2001 From: Kenneth R Westerback Date: Sun, 12 Feb 2017 13:15:51 +0000 Subject: Switch from 'legacy' errwarn.c to standard daemon logging functions. No objections heard. Feedback from millert@ guenther@ --- sbin/dhclient/parse.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sbin/dhclient/parse.c') diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c index d71242596e9..8de21943414 100644 --- a/sbin/dhclient/parse.c +++ b/sbin/dhclient/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.41 2017/02/11 16:12:36 krw Exp $ */ +/* $OpenBSD: parse.c,v 1.42 2017/02/12 13:15:50 krw Exp $ */ /* Common parser code for dhcpd and dhclient. */ @@ -61,6 +61,7 @@ #include "dhcp.h" #include "dhcpd.h" #include "dhctoken.h" +#include "log.h" /* * Skip to the semicolon ending the current statement. If we encounter @@ -144,7 +145,7 @@ parse_string(FILE *cfile) } s = strdup(val); if (!s) - error("no memory for string %s.", val); + fatalx("no memory for string %s.", val); if (!parse_semi(cfile)) { free(s); @@ -413,11 +414,13 @@ parse_date(FILE *cfile) return (guess); } +int warnings_occurred; + void parse_warn(char *msg) { static char spaces[81]; - extern char mbuf[1024]; + static char mbuf[1024]; struct iovec iov[6]; size_t iovcnt; int i; -- cgit v1.2.3