udhcp: handle errors in read_staticlease
also gets rid of ether-aton's static buffer in ether-wake: text data bss dec hexfilename 838664 441 7572 846677 ceb55busybox_old 838650 441 7564 846655 ceb3fbusybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -90,7 +90,7 @@ static void nameif_parse_selector(ethtable_t *ch, char *selector)
|
||||
} else {
|
||||
#endif
|
||||
lmac = xmalloc(ETH_ALEN);
|
||||
ch->mac = ether_aton_r(selector + (strncmp(selector, "mac=", 4) ? 0 : 4), lmac);
|
||||
ch->mac = ether_aton_r(selector + (strncmp(selector, "mac=", 4) != 0 ? 0 : 4), lmac);
|
||||
if (ch->mac == NULL)
|
||||
bb_error_msg_and_die("can't parse %s", selector);
|
||||
#if ENABLE_FEATURE_NAMEIF_EXTENDED
|
||||
|
Reference in New Issue
Block a user