summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-10-11 22:57:01 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-10-11 22:57:01 +0000
commit9078f3f4c60f21f0230460d4c71a22c8f3b66e67 (patch)
tree511b92f6c5bbd5ec0e89ef2883488b87b82307ff /sbin/dhclient
parentd141d767eacb3eb8730f7f1857266baff84fbfbb (diff)
Works better when both files in a diff are
committed.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/parse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index c428d7bd749..91b8e55eed9 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.70 2017/10/11 15:06:27 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.71 2017/10/11 22:57:00 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -387,7 +387,7 @@ parse_date(FILE *cfile, time_t *date)
n = 0;
do {
- token = next_token(&val, cfile);
+ token = peek_token(&val, cfile);
switch (token) {
case EOF:
@@ -404,9 +404,11 @@ parse_date(FILE *cfile, time_t *date)
return 1;
}
}
+ token = next_token(NULL, cfile);
break;
default:
n = strlcat(timestr, val, sizeof(timestr));
+ token = next_token(NULL, cfile);
break;
}