summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient/parse.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2018-01-04 03:02:05 +0000
committerkrw <krw@openbsd.org>2018-01-04 03:02:05 +0000
commit5c0181a44f0936ab5650d35873b628c016e4264c (patch)
tree67dc38a85f16a372fb8838610bdd751a9883fe51 /sbin/dhclient/parse.c
parentWe only parse decimal numbers, so parse_decimal() -> parse_number() to (diff)
downloadwireguard-openbsd-5c0181a44f0936ab5650d35873b628c016e4264c.tar.xz
wireguard-openbsd-5c0181a44f0936ab5650d35873b628c016e4264c.zip
parse_lease_time() is an unnecessary abstraction. Just use
parse_number('L') since it is parsing unsigned 32bit integers.
Diffstat (limited to 'sbin/dhclient/parse.c')
-rw-r--r--sbin/dhclient/parse.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/sbin/dhclient/parse.c b/sbin/dhclient/parse.c
index 1f161e8f816..bd777338889 100644
--- a/sbin/dhclient/parse.c
+++ b/sbin/dhclient/parse.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.c,v 1.78 2018/01/04 02:27:55 krw Exp $ */
+/* $OpenBSD: parse.c,v 1.79 2018/01/04 03:02:05 krw Exp $ */
/* Common parser code for dhcpd and dhclient. */
@@ -225,31 +225,6 @@ parse_ip_addr(FILE *cfile, struct in_addr *addr)
return 0;
}
-/*
- * lease-time :== NUMBER SEMI
- */
-int
-parse_lease_time(FILE *cfile, time_t *timep)
-{
- const char *errstr;
- char *val;
- long long numval;
- int token;
-
- token = next_token(&val, cfile);
- numval = strtonum(val, 0, UINT32_MAX, &errstr);
- if (errstr == NULL) {
- *timep = numval;
- return 1;
- }
-
- parse_warn("expecting integer between 0 and 4294967295.");
- if (token != ';')
- skip_to_semi(cfile);
-
- return 0;
-}
-
int
parse_boolean(FILE *cfile, unsigned char *buf)
{