diff options
Diffstat (limited to 'common/cmd_nvedit.c')
-rw-r--r-- | common/cmd_nvedit.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index e1ccdd8..5999cb8 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -343,21 +343,7 @@ int _do_env_set(int flag, int argc, char * const argv[]) * Some variables should be updated when the corresponding * entry in the environment is changed */ - if (strcmp(name, "ipaddr") == 0) { - char *s = argv[2]; /* always use only one arg */ - char *e; - unsigned long addr; - bd->bi_ip_addr = 0; - for (addr = 0, i = 0; i < 4; ++i) { - ulong val = s ? simple_strtoul(s, &e, 10) : 0; - addr <<= 8; - addr |= val & 0xFF; - if (s) - s = *e ? e + 1 : e; - } - bd->bi_ip_addr = htonl(addr); - return 0; - } else if (strcmp(argv[1], "loadaddr") == 0) { + if (strcmp(argv[1], "loadaddr") == 0) { load_addr = simple_strtoul(argv[2], NULL, 16); return 0; } |