diff options
| author | Simon Glass <[email protected]> | 2021-12-18 11:27:52 -0700 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2022-01-21 14:01:35 -0500 |
| commit | 434075393d7c41457662d996418e5acd0f3da0cb (patch) | |
| tree | d77ccb4bb319c372ddf350f1d299f68231e0c5f4 /cmd | |
| parent | d3877fba3172486245f02f1b027f3069de891ca7 (diff) | |
net: Drop #ifdefs with CONFIG_BOOTP_SERVERIP
Use IS_ENABLED() instead, to reduce the number of build paths.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Ramon Fried <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/net.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/cmd/net.c b/cmd/net.c index 651c1411f4d..3619c843d83 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -152,16 +152,14 @@ static void netboot_update_env(void) ip_to_string(net_ip, tmp); env_set("ipaddr", tmp); } -#if !defined(CONFIG_BOOTP_SERVERIP) /* * Only attempt to change serverip if net/bootp.c:store_net_params() * could have set it */ - if (net_server_ip.s_addr) { + if (!IS_ENABLED(CONFIG_BOOTP_SERVERIP) && net_server_ip.s_addr) { ip_to_string(net_server_ip, tmp); env_set("serverip", tmp); } -#endif if (net_dns_server.s_addr) { ip_to_string(net_dns_server, tmp); env_set("dnsip", tmp); |
