summaryrefslogtreecommitdiffhomepage
path: root/networking/udhcp/files.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 14:43:21 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-11-27 14:43:21 +0000
commitd686a045c8134d3a42fa5cc6b2e09118e08d603f (patch)
tree38f509fc9556f68f758c77b06b480cc33b2725eb /networking/udhcp/files.c
parent8a0a83d503a7971895254efa9e79cf15ba1850d4 (diff)
safe_strtoXX interface proved to be a bit unconvenient.
Remove it, introduce saner bb_strtoXX. Saved ~350 bytes.
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r--networking/udhcp/files.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index 829d7e960..5e399e1f8 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -64,7 +64,8 @@ static int read_str(const char *line, void *arg)
static int read_u32(const char *line, void *arg)
{
- return safe_strtou32(line, (uint32_t*)arg) == 0;
+ *((uint32_t*)arg) = bb_strtou32(line, NULL, 10);
+ return errno == 0;
}
@@ -101,7 +102,8 @@ static void attach_option(struct option_set **opt_list,
struct option_set *existing, *new, **curr;
/* add it to an existing option */
- if ((existing = find_option(*opt_list, option->code))) {
+ existing = find_option(*opt_list, option->code);
+ if (existing) {
DEBUG("Attaching option %s to existing member of list", option->name);
if (option->flags & OPTION_LIST) {
if (existing->data[OPT_LEN] + length <= 255) {