diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-27 14:43:21 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-27 14:43:21 +0000 |
commit | 278809224505ecc8bbef7b9a86982bf35b46e719 (patch) | |
tree | 38f509fc9556f68f758c77b06b480cc33b2725eb /networking/udhcp/files.c | |
parent | 7efaf01635fb84c9c6cbaa179831423f2d11bcf3 (diff) | |
download | busybox-w32-278809224505ecc8bbef7b9a86982bf35b46e719.tar.gz busybox-w32-278809224505ecc8bbef7b9a86982bf35b46e719.tar.bz2 busybox-w32-278809224505ecc8bbef7b9a86982bf35b46e719.zip |
safe_strtoXX interface proved to be a bit unconvenient.
Remove it, introduce saner bb_strtoXX.
Saved ~350 bytes.
git-svn-id: svn://busybox.net/trunk/busybox@16684 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r-- | networking/udhcp/files.c | 6 |
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) | |||
64 | 64 | ||
65 | static int read_u32(const char *line, void *arg) | 65 | static int read_u32(const char *line, void *arg) |
66 | { | 66 | { |
67 | return safe_strtou32(line, (uint32_t*)arg) == 0; | 67 | *((uint32_t*)arg) = bb_strtou32(line, NULL, 10); |
68 | return errno == 0; | ||
68 | } | 69 | } |
69 | 70 | ||
70 | 71 | ||
@@ -101,7 +102,8 @@ static void attach_option(struct option_set **opt_list, | |||
101 | struct option_set *existing, *new, **curr; | 102 | struct option_set *existing, *new, **curr; |
102 | 103 | ||
103 | /* add it to an existing option */ | 104 | /* add it to an existing option */ |
104 | if ((existing = find_option(*opt_list, option->code))) { | 105 | existing = find_option(*opt_list, option->code); |
106 | if (existing) { | ||
105 | DEBUG("Attaching option %s to existing member of list", option->name); | 107 | DEBUG("Attaching option %s to existing member of list", option->name); |
106 | if (option->flags & OPTION_LIST) { | 108 | if (option->flags & OPTION_LIST) { |
107 | if (existing->data[OPT_LEN] + length <= 255) { | 109 | if (existing->data[OPT_LEN] + length <= 255) { |