[PATCH 4/4] dhcp: replace dhcp_getenv_int with getenv_uint

Sascha Hauer s.hauer at pengutronix.de
Fri Sep 27 02:30:04 EDT 2013


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 net/dhcp.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/net/dhcp.c b/net/dhcp.c
index ff54924..e0c231f 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) {
-- 
1.8.4.rc3




More information about the barebox mailing list