From: Chris Packham <judge.packham@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] net: bootp: Fix compile error processing ntpserver option
Date: Thu, 3 May 2018 20:19:03 +1200 [thread overview]
Message-ID: <20180503081903.23592-2-judge.packham@gmail.com> (raw)
In-Reply-To: <20180503081903.23592-1-judge.packham@gmail.com>
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 <judge.packham@gmail.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
---
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
next prev parent reply other threads:[~2018-05-03 8:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-03 8:19 [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Chris Packham
2018-05-03 8:19 ` Chris Packham [this message]
2018-05-15 12:28 ` [U-Boot] [U-Boot, v2, 2/2] net: bootp: Fix compile error processing ntpserver option Tom Rini
2018-05-03 15:15 ` [U-Boot] [PATCH v2 1/2] net: Add Kconfig option for BOOTP_NTPSERVER Joe Hershberger
2018-05-15 12:28 ` [U-Boot] [U-Boot, v2, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180503081903.23592-2-judge.packham@gmail.com \
--to=judge.packham@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.