*: use llist_pop for traverse-and-free list operation
function old new delta append_file_list_to_list 109 111 +2 udhcpc_main 2414 2413 -1 run_parts_main 325 324 -1 od_main 2324 2323 -1 getopt_main 709 707 -2 env_main 253 251 -2 sed_main 659 656 -3 ps_main 522 519 -3 traceroute_main 3960 3954 -6 sort_main 844 838 -6 diff_main 866 858 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33) Total: -31 bytes
This commit is contained in:
@ -259,12 +259,11 @@ int udhcpc_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
if (opt & OPT_o)
|
||||
client_config.no_default_options = 1;
|
||||
while (list_O) {
|
||||
int n = index_in_strings(dhcp_option_strings, list_O->data);
|
||||
int n = index_in_strings(dhcp_option_strings, llist_pop(&list_O));
|
||||
if (n < 0)
|
||||
bb_error_msg_and_die("unknown option '%s'", list_O->data);
|
||||
n = dhcp_options[n].code;
|
||||
client_config.opt_mask[n >> 3] |= 1 << (n & 7);
|
||||
list_O = list_O->link;
|
||||
}
|
||||
|
||||
if (read_interface(client_config.interface, &client_config.ifindex,
|
||||
|
Reference in New Issue
Block a user