From: Francis Dupont Date: Thu, 12 Jun 2008 13:27:55 +0000 (+0000) Subject: fix format code 'Z' X-Git-Tag: v4_1_0a2~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=800977648760bdffadf63fa478c4d4ab2e17a566;p=thirdparty%2Fdhcp.git fix format code 'Z' --- diff --git a/RELNOTES b/RELNOTES index 7e74dbe5d..56f664ff7 100644 --- a/RELNOTES +++ b/RELNOTES @@ -89,6 +89,8 @@ work on other platforms. Please report any problems and suggested fixes to - A double-dereference in dhclient transmission of DHCPDECLINEs was repaired. +- Fix handling of format code 'Z'. + Changes since 4.0.0 (new features) - Added DHCPv6 rapid commit support. diff --git a/common/options.c b/common/options.c index 72b05863d..c4de1e406 100644 --- a/common/options.c +++ b/common/options.c @@ -1631,6 +1631,7 @@ format_min_length(format, oc) case 'x': /* "Hex" */ case 'A': /* Array of all that precedes. */ case 'a': /* Array of preceding symbol. */ + case 'Z': /* nothing. */ return min_len; case 'c': /* Compress flag for D atom. */ @@ -1773,10 +1774,12 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) case 'b': case 'B': case 'f': + case 'F': hunksize++; hunkinc = 1; break; case 'e': + case 'Z': break; case 'o': opthunk += hunkinc; @@ -1989,12 +1992,20 @@ const char *pretty_print_option (option, data, len, emit_commas, emit_quotes) case 'B': sprintf (op, "%d", *dp++); break; + case 'X': case 'x': sprintf (op, "%x", *dp++); break; case 'f': strcpy (op, *dp++ ? "true" : "false"); break; + case 'F': + strcpy (op, "true"); + break; + case 'e': + case 'Z': + *op = '\0'; + break; default: log_error ("Unexpected format code %c", fmtbuf [j]);