From 439e249b3e8696c8eac136a846d5d5bdffc071a1 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Fri, 5 May 2023 19:58:15 +0000 Subject: Fix a build failure with -Werror=address MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit dhcp.c: In function ‘parse_reply’: dhcp.c:216:13: error: the comparison will always evaluate as ‘true’ for the address of ‘bootfile’ will never be NULL [-Werror=address] 216 | if (breq->bootfile && strlen(breq->bootfile) > 0) { | ^~~~ dhcp.c:102:14: note: ‘bootfile’ declared here 102 | char bootfile[128]; | ^~~~~~~~ cc1: all warnings being treated as errors --- mdk-stage1/dhcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/dhcp.c b/mdk-stage1/dhcp.c index 77f8f356b..678031e85 100644 --- a/mdk-stage1/dhcp.c +++ b/mdk-stage1/dhcp.c @@ -213,7 +213,7 @@ static void parse_reply(struct bootp_request * breq, struct interface_info * int unsigned char * chptr; unsigned char option, length; - if (breq->bootfile && strlen(breq->bootfile) > 0) { + if (strlen(breq->bootfile) > 0) { if (IS_NETAUTO) add_to_env("KICKSTART", breq->bootfile); else -- cgit v1.2.1