*: optimize code size in strtoul calls
function old new delta bb_parse_mode 433 431 -2 rtnl_rtntype_a2n 202 198 -4 ParseField 511 498 -13 bb_init_module_24 4730 4675 -55 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-74) Total: -74 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -88,7 +88,7 @@ int rtnl_rtntype_a2n(int *id, char *arg)
|
||||
res = RTN_THROW;
|
||||
else {
|
||||
res = strtoul(arg, &end, 0);
|
||||
if (!end || end == arg || *end || res > 255)
|
||||
if (end == arg || *end || res > 255)
|
||||
return -1;
|
||||
}
|
||||
*id = res;
|
||||
|
Reference in New Issue
Block a user