udhcp: finish support of classless static routes

function                                             old     new   delta
udhcp_str2optset                                     415     532    +117

Signed-off-by: Michael McTernan <Michael.McTernan.2001@cs.bris.ac.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Michael McTernan
2011-12-16 17:05:52 +01:00
committed by Denys Vlasenko
parent be2a557918
commit 7b57ff4436
2 changed files with 13 additions and 2 deletions

View File

@ -168,6 +168,15 @@ uint32_t bb_strtou32(const char *arg, char **endp, int base)
return bb_strtoul(arg, endp, base);
return BUG_bb_strtou32_unimplemented();
}
static ALWAYS_INLINE
int32_t bb_strtoi32(const char *arg, char **endp, int base)
{
if (sizeof(int32_t) == sizeof(int))
return bb_strtoi(arg, endp, base);
if (sizeof(int32_t) == sizeof(long))
return bb_strtol(arg, endp, base);
return BUG_bb_strtou32_unimplemented();
}
/* Floating point */