diff options
author | 2019-07-21 15:59:51 +0000 | |
---|---|---|
committer | 2019-07-21 15:59:51 +0000 | |
commit | 7524c6dcc1ee7a0a62219f00eceefec1ce2323dd (patch) | |
tree | 5df727c9284484ead422c51153b58f8be1019955 | |
parent | Replace malloc()/memcpy() with strdup() in parse_string(). Nuke 'len' parameter (diff) | |
download | wireguard-openbsd-7524c6dcc1ee7a0a62219f00eceefec1ce2323dd.tar.xz wireguard-openbsd-7524c6dcc1ee7a0a62219f00eceefec1ce2323dd.zip |
Restructure parse_semi() so it resembles the other parse_*
functions.
-rw-r--r-- | sbin/dhclient/parse.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c index 43e79c835ea..946e056cb13 100644 --- a/sbin/dhclient/parse.c +++ b/sbin/dhclient/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.81 2019/07/21 15:47:02 krw Exp $ */ +/* $OpenBSD: parse.c,v 1.82 2019/07/21 15:59:51 krw Exp $ */ /* Common parser code for dhcpd and dhclient. */ @@ -111,12 +111,13 @@ parse_semi(FILE *cfile) int token; token = next_token(NULL, cfile); - if (token != ';') { - parse_warn("expecting semicolon."); - skip_to_semi(cfile); - return 0; - } - return 1; + if (token == ';') + return 1; + + parse_warn("expecting semicolon."); + skip_to_semi(cfile); + + return 0; } int |