diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-10-09 21:33:12 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2017-10-09 21:33:12 +0000 |
commit | eb25e3a3be14a55e11aa67b8c89341646216a38d (patch) | |
tree | cb30281f0ffdec04580139e14cb7497c69dd2080 /sbin/dhclient/dhcpd.h | |
parent | 226698ec8f8951139c93ec33ac63385d99cce342 (diff) |
Tweak parse_lease_time() to emit a single message on
failure ("expecting unsigned 32-bit decimal value") and to
properly handle the terminating ';' in error situations.
Make parse_lease_time() return an int to indicate success
or failure as its friends do. Also avoid swapping endianess
twice.
Use == 1 vs != 0 when checking parse_ip_addr() return
value.
Diffstat (limited to 'sbin/dhclient/dhcpd.h')
-rw-r--r-- | sbin/dhclient/dhcpd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhclient/dhcpd.h b/sbin/dhclient/dhcpd.h index cfbc63ca9cf..e7321af8ae1 100644 --- a/sbin/dhclient/dhcpd.h +++ b/sbin/dhclient/dhcpd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: dhcpd.h,v 1.228 2017/09/20 15:14:52 krw Exp $ */ +/* $OpenBSD: dhcpd.h,v 1.229 2017/10/09 21:33:11 krw Exp $ */ /* * Copyright (c) 2004 Henning Brauer <henning@openbsd.org> @@ -182,7 +182,7 @@ int parse_semi(FILE *); char *parse_string(FILE *, unsigned int *); int parse_ip_addr(FILE *, struct in_addr *); int parse_cidr(FILE *, unsigned char *); -void parse_lease_time(FILE *, time_t *); +int parse_lease_time(FILE *, time_t *); int parse_decimal(FILE *, unsigned char *, char); int parse_hex(FILE *, unsigned char *); int parse_boolean(FILE *, unsigned char *); |