summaryrefslogtreecommitdiff
path: root/sbin/dhclient/clparse.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-10-10 14:01:09 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-10-10 14:01:09 +0000
commita00fa196b7d1e42160ed969d99f8ee3ff75f8d26 (patch)
tree4c2a9233e6425a8beb1f4c81e8327b5e4b06c34a /sbin/dhclient/clparse.c
parent8a3ec88570416b3eb058c6ba5f61976b20cfa975 (diff)
Tweak parse_boolean() to be more like its friends.
i.e. handle ';' better, and issue error message ("expecting boolean.") itself.
Diffstat (limited to 'sbin/dhclient/clparse.c')
-rw-r--r--sbin/dhclient/clparse.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c
index 44768316543..5eca5acb41e 100644
--- a/sbin/dhclient/clparse.c
+++ b/sbin/dhclient/clparse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clparse.c,v 1.130 2017/10/09 21:33:11 krw Exp $ */
+/* $OpenBSD: clparse.c,v 1.131 2017/10/10 14:01:08 krw Exp $ */
/* Parser for dhclient config and lease files. */
@@ -726,11 +726,8 @@ parse_option_decl(FILE *cfile, struct option_data *options)
dp = buf;
break;
case 'f': /* Boolean flag. */
- if (parse_boolean(cfile, buf) == 0) {
- parse_warn("expecting boolean.");
- skip_to_semi(cfile);
+ if (parse_boolean(cfile, buf) == 0)
return -1;
- }
len = 1;
dp = buf;
break;