dhcpc: refactor xmalloc_optname_optval to shrink binary size

function                                             old     new   delta
len_of_option_as_string                               14      13      -1
dhcp_option_lengths                                   14      13      -1
udhcp_str2optset                                     641     637      -4
static.xmalloc_optname_optval                        777     718     -59
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-65)             Total: -65 bytes

Signed-off-by: Martin Lewis <martin.lewis.x84@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Martin Lewis
2020-06-09 16:59:54 -05:00
committed by Denys Vlasenko
parent 17764603f2
commit d30d1ebc11
2 changed files with 16 additions and 27 deletions

View File

@@ -78,7 +78,7 @@ struct BUG_bad_sizeof_struct_ip_udp_dhcp_packet {
/*** Options ***/
enum {
OPTION_IP = 1,
OPTION_IP = 0,
OPTION_IP_PAIR,
OPTION_STRING,
/* Opts of STRING_HOST type will be sanitized before they are passed