All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot,RFC] common: cli_hush: avoid dead code
Date: Sun, 6 Dec 2015 17:06:00 -0500	[thread overview]
Message-ID: <20151206220600.GD9551@bill-the-cat> (raw)
In-Reply-To: <1448355263-545-2-git-send-email-Peng.Fan@freescale.com>

On Tue, Nov 24, 2015 at 04:54:21PM +0800, Peng Fan wrote:

> Condition "(value == NULL && ++value == NULL)" actully will
> always return false.
> 
> Instead, use condition "(value == NULL || *(value + 1) == 0)" to detect
> such expression "c=". To "c=", *(value + 1) is 0, so directly return -1,
> but not continue.
> 
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Cc: Rabin Vincent <rabin@rab.in>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: Tom Rini <trini@konsulko.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151206/b1d1b087/attachment.sig>

  parent reply	other threads:[~2015-12-06 22:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-24  8:54 [U-Boot] [PATCH] common: bootm: check return value of strict_strtoul Peng Fan
2015-11-24  8:54 ` [U-Boot] [RFC] common: cli_hush: avoid dead code Peng Fan
2015-11-24 19:04   ` Simon Glass
2015-12-06 22:06   ` Tom Rini [this message]
2015-11-24  8:54 ` [U-Boot] [PATCH] common: image-fdt: correct fdt_blob for IMAGE_FORMAT_LEGACY Peng Fan
2015-11-24 19:04   ` Simon Glass
2015-11-25  1:12     ` Peng Fan
2015-12-01 20:01       ` Simon Glass
2015-12-06 22:06   ` [U-Boot] " Tom Rini
2015-11-24  8:54 ` [U-Boot] [PATCH] video: ipu: simplify if else code Peng Fan
2015-11-24  9:55   ` Stefano Babic
2015-11-24 19:04 ` [U-Boot] [PATCH] common: bootm: check return value of strict_strtoul Simon Glass
2015-12-06 22:05 ` [U-Boot] " 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=20151206220600.GD9551@bill-the-cat \
    --to=trini@konsulko.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.