public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] net: Fix arguments in tftpput command
Date: Sat, 17 Dec 2011 21:00:35 +0100	[thread overview]
Message-ID: <20111217200035.7B2951ECC61@gemini.denx.de> (raw)
In-Reply-To: <1324095888-22757-1-git-send-email-sjg@chromium.org>

Dear Simon Glass,

In message <1324095888-22757-1-git-send-email-sjg@chromium.org> you wrote:
> The switch to strict_strtoul() was not done correctly - this fixes
> the compile error when CONFIG_CMD_TFTPPUT is active.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>  common/cmd_net.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/common/cmd_net.c b/common/cmd_net.c
> index f89a24b..be7cc01 100644
> --- a/common/cmd_net.c
> +++ b/common/cmd_net.c
> @@ -221,8 +221,8 @@ static int netboot_common(enum proto_t proto, cmd_tbl_t *cmdtp, int argc,
>  
>  #ifdef CONFIG_CMD_TFTPPUT
>  	case 4:
> -		save_addr = strict_strtoul(argv[1], NULL, 16);
> -		save_size = strict_strtoul(argv[2], NULL, 16);
> +		strict_strtoul(argv[1], 16, &save_addr);
> +		strict_strtoul(argv[2], 16, &save_size);

strict_strtoul() returns error codes.  We should not ignore these.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Vulcans believe peace should not depend on force.
	-- Amanda, "Journey to Babel", stardate 3842.3

  parent reply	other threads:[~2011-12-17 20:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-17  4:24 [U-Boot] [PATCH] net: Fix arguments in tftpput command Simon Glass
2011-12-17 18:54 ` Mike Frysinger
2011-12-17 20:00 ` Wolfgang Denk [this message]
2011-12-18  5:52   ` Simon Glass

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=20111217200035.7B2951ECC61@gemini.denx.de \
    --to=wd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox