From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv2] sntp: avoid use of uninitialized variable
Date: Tue, 17 May 2011 10:32:28 +0200 [thread overview]
Message-ID: <m2r57xviar.fsf@ohwell.denx.de> (raw)
In-Reply-To: <1305606431-13473-1-git-send-email-judge.packham@gmail.com> (Chris Packham's message of "Tue, 17 May 2011 16:27:11 +1200")
Hi Chris,
> From: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>
>
> When we use the ntpserverip environment variable argv[1] may not be set.
> Printing the error message using the NetNtpServerIP variable ensures the
> correct output in both cases.
>
> Signed-off-by: Luuk Paulussen <luuk.paulussen@alliedtelesis.co.nz>
> Acked-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> Cc: Ben Warren <biggerbadderben@gmail.com>
> ---
> Changes since v1:
> - run through checkpatch.pl, fix line > 80 chars
>
> common/cmd_net.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/common/cmd_net.c b/common/cmd_net.c
> index 8c6f5c8..fae3c7f 100644
> --- a/common/cmd_net.c
> +++ b/common/cmd_net.c
> @@ -324,7 +324,8 @@ int do_sntp (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> else NetTimeOffset = simple_strtol (toff, NULL, 10);
>
> if (NetLoop(SNTP) < 0) {
> - printf("SNTP failed: host %s not responding\n", argv[1]);
> + printf("SNTP failed: host %pI4 not responding\n",
> + &NetNtpServerIP);
> return 1;
> }
Acked-by: Detlev Zundel <dzu@denx.de>
Cheers
Detlev
--
Is this a private fight or can anyone join in?
-- Old Irish saying
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
next prev parent reply other threads:[~2011-05-17 8:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-13 1:29 [U-Boot] [PATCH 1/3] rtc: add driver for internal RTC on kirkwood SoC Chris Packham
2011-05-13 1:29 ` [U-Boot] [PATCH 2/3] sntp: avoid use of uninitialized variable Chris Packham
2011-05-13 1:29 ` [U-Boot] [PATCH 3/3] bootp: add ntpserver option to bootp request Chris Packham
2011-05-13 1:33 ` Chris Packham
2011-05-16 2:24 ` [U-Boot] [PATCHv2] " Chris Packham
2011-05-16 11:57 ` Sergei Shtylyov
2011-05-17 4:09 ` Chris Packham
2011-05-17 4:29 ` [U-Boot] [PATCHv3] " Chris Packham
2011-07-27 21:20 ` Wolfgang Denk
2011-05-13 1:34 ` [U-Boot] [PATCH 2/3] sntp: avoid use of uninitialized variable Chris Packham
2011-05-17 4:27 ` [U-Boot] [PATCHv2] " Chris Packham
2011-05-17 8:32 ` Detlev Zundel [this message]
2011-05-13 1:32 ` [U-Boot] [PATCH 1/3] rtc: add driver for internal RTC on kirkwood SoC Chris Packham
2011-05-17 4:25 ` [U-Boot] [PATCHv2] " Chris Packham
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=m2r57xviar.fsf@ohwell.denx.de \
--to=dzu@denx.de \
--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.