From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Packham Date: Thu, 3 May 2018 20:19:03 +1200 Subject: [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option In-Reply-To: <20180503081903.23592-1-judge.packham@gmail.com> References: <20180503081903.23592-1-judge.packham@gmail.com> Message-ID: <20180503081903.23592-2-judge.packham@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de When the following configuration is set # CONFIG_CMD_DHCP is not set CONFIG_CMD_BOOTP=y CONFIG_BOOTP_NTPSERVER=y The following compile error is observed error: used struct type value where scalar is required if (net_ntp_server) ^~~~~~~~~~~~~~ Resolve this by checking net_ntp_server.s_addr instead. Signed-off-by: Chris Packham Acked-by: Joe Hershberger --- Changes in v2: - collect Ack from Joe net/bootp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bootp.c b/net/bootp.c index efa959971c27..9d7cb5d30c14 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -333,7 +333,7 @@ static void bootp_process_vendor(u8 *ext, int size) debug("net_nis_domain : %s\n", net_nis_domain); #if defined(CONFIG_CMD_SNTP) && defined(CONFIG_BOOTP_NTPSERVER) - if (net_ntp_server) + if (net_ntp_server.s_addr) debug("net_ntp_server : %pI4\n", &net_ntp_server); #endif } -- 2.17.0