net: punt bd->bi_ip_addr
This field gets read in one place (by "bdinfo"), and we can replace
that with getenv("ipaddr"). After all, the bi_ip_addr field is kept
up-to-date implicitly with the value of the ipaddr env var.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
This commit is contained in:
committed by
Joe Hershberger
parent
e1902ac698
commit
50a47d0523
@@ -338,13 +338,11 @@ void net_auto_load(void)
|
||||
static void NetInitLoop(enum proto_t protocol)
|
||||
{
|
||||
static int env_changed_id;
|
||||
bd_t *bd = gd->bd;
|
||||
int env_id = get_env_id();
|
||||
|
||||
/* update only when the environment has changed */
|
||||
if (env_changed_id != env_id) {
|
||||
NetOurIP = getenv_IPaddr("ipaddr");
|
||||
NetCopyIP(&bd->bi_ip_addr, &NetOurIP);
|
||||
NetOurGatewayIP = getenv_IPaddr("gatewayip");
|
||||
NetOurSubnetMask = getenv_IPaddr("netmask");
|
||||
NetServerIP = getenv_IPaddr("serverip");
|
||||
|
||||
Reference in New Issue
Block a user