diff options
author | Simon Glass <sjg@chromium.org> | 2021-12-18 11:27:52 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-01-21 14:01:35 -0500 |
commit | 434075393d7c41457662d996418e5acd0f3da0cb (patch) | |
tree | d77ccb4bb319c372ddf350f1d299f68231e0c5f4 /cmd/net.c | |
parent | d3877fba3172486245f02f1b027f3069de891ca7 (diff) | |
download | u-boot-434075393d7c41457662d996418e5acd0f3da0cb.tar.gz u-boot-434075393d7c41457662d996418e5acd0f3da0cb.tar.bz2 u-boot-434075393d7c41457662d996418e5acd0f3da0cb.zip |
net: Drop #ifdefs with CONFIG_BOOTP_SERVERIP
Use IS_ENABLED() instead, to reduce the number of build paths.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'cmd/net.c')
-rw-r--r-- | cmd/net.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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); |