diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-09-25 08:11:40 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-10-07 07:59:00 +0200 |
commit | d28c9bb55deb4146f8f98bf112d5e9aea3f08f81 (patch) | |
tree | 1aad21b59ce4864bb5bdd50d6fb7dbcb698e01bd /net | |
parent | 0546e669a2d0da28134326590f740820df7fdb70 (diff) | |
download | barebox-d28c9bb55deb4146f8f98bf112d5e9aea3f08f81.tar.gz barebox-d28c9bb55deb4146f8f98bf112d5e9aea3f08f81.tar.xz |
dhcp: replace dhcp_getenv_int with getenv_uint
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/dhcp.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/net/dhcp.c b/net/dhcp.c index ff54924762..e0c231fb42 100644 --- a/net/dhcp.c +++ b/net/dhcp.c @@ -699,16 +699,6 @@ static int dhcp_global_init(void) } late_initcall(dhcp_global_init); -static void dhcp_getenv_int(const char *name, int *i) -{ - const char* str = getenv(name); - - if (!str) - return; - - *i = simple_strtoul(str, NULL, 10); -} - static int do_dhcp(int argc, char *argv[]) { int ret, opt; @@ -716,7 +706,7 @@ static int do_dhcp(int argc, char *argv[]) dhcp_reset_env(); - dhcp_getenv_int("global.dhcp.retries", &retries); + getenv_uint("global.dhcp.retries", &retries); while((opt = getopt(argc, argv, "H:v:c:u:U:r:")) > 0) { switch(opt) { |