From e17a650b7d411420bfdb41a9aa9e00de8269da6d Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Sat, 16 Jul 2005 16:31:06 +0000 Subject: back out last; breaks in cases where we want hex and the last byte is 0 --- sbin/dhclient/options.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sbin/dhclient') 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 { -- cgit v1.2.3