aboutsummaryrefslogtreecommitdiff
path: root/net/bootp.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-12-18 11:27:52 -0700
committerTom Rini <trini@konsulko.com>2022-01-21 14:01:35 -0500
commit434075393d7c41457662d996418e5acd0f3da0cb (patch)
treed77ccb4bb319c372ddf350f1d299f68231e0c5f4 /net/bootp.c
parentd3877fba3172486245f02f1b027f3069de891ca7 (diff)
downloadu-boot-434075393d7c41457662d996418e5acd0f3da0cb.zip
u-boot-434075393d7c41457662d996418e5acd0f3da0cb.tar.gz
u-boot-434075393d7c41457662d996418e5acd0f3da0cb.tar.bz2
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 'net/bootp.c')
-rw-r--r--net/bootp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bootp.c b/net/bootp.c
index 58e30cd..d83e4eb 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -148,10 +148,12 @@ static int check_reply_packet(uchar *pkt, unsigned dest, unsigned src,
static void store_bootp_params(struct bootp_hdr *bp)
{
-#if !defined(CONFIG_BOOTP_SERVERIP)
struct in_addr tmp_ip;
bool overwrite_serverip = true;
+ if (IS_ENABLED(CONFIG_BOOTP_SERVERIP))
+ return;
+
#if defined(CONFIG_BOOTP_PREFER_SERVERIP)
overwrite_serverip = false;
#endif
@@ -179,7 +181,6 @@ static void store_bootp_params(struct bootp_hdr *bp)
*/
if (*net_boot_file_name)
env_set("bootfile", net_boot_file_name);
-#endif
}
/*