summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2005-07-16 16:31:05 +0000
committerhenning <henning@openbsd.org>2005-07-16 16:31:05 +0000
commitb54c879ea5b8621a4848a492f7371049fc45d4ea (patch)
treeba19d4a1786ff1795c15d2113ac1810895846c6f
parentNULL is not a time_t. From brooks at freebsd. (diff)
downloadwireguard-openbsd-b54c879ea5b8621a4848a492f7371049fc45d4ea.tar.xz
wireguard-openbsd-b54c879ea5b8621a4848a492f7371049fc45d4ea.zip
back out last; breaks in cases where we want hex and the last byte is 0
-rw-r--r--sbin/dhclient/options.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sbin/dhclient/options.c b/sbin/dhclient/options.c
index 18e77264e8b..e31ed2289ce 100644
--- a/sbin/dhclient/options.c
+++ b/sbin/dhclient/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.23 2005/07/15 10:40:27 henning Exp $ */
+/* $OpenBSD: options.c,v 1.24 2005/07/16 16:31:05 henning Exp $ */
/* DHCP options parsing and reassembly. */
@@ -279,11 +279,7 @@ pretty_print_option(unsigned int code, unsigned char *data, int len,
if (!isascii(data[k]) ||
!isprint(data[k]))
break;
- /* If we found no bogus characters, or the bogus
- character we found is a trailing NUL, it's
- okay to print this option as text. */
-
- if (k == len || (k + 1 == len && data [k] == 0)) {
+ if (k == len) {
fmtbuf[i] = 't';
numhunk = -2;
} else {