diff mbox series

[1/1] post: remove redundant condition

Message ID 20200803201213.14932-1-xypron.glpk@gmx.de
State Accepted
Commit 86eeac7bcf486de3f4182c2a084eff181b8c6e63
Delegated to: Tom Rini
Headers show
Series [1/1] post: remove redundant condition | expand

Commit Message

Heinrich Schuchardt Aug. 3, 2020, 8:12 p.m. UTC
(A && A == 0x20) is only true for (A == 0x20).

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 post/post.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.27.0

Comments

Simon Glass Aug. 4, 2020, 2 a.m. UTC | #1
On Mon, 3 Aug 2020 at 14:12, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> (A && A == 0x20) is only true for (A == 0x20).
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  post/post.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Oct. 24, 2020, 2:51 p.m. UTC | #2
On Mon, Aug 03, 2020 at 10:12:13PM +0200, Heinrich Schuchardt wrote:

> (A && A == 0x20) is only true for (A == 0x20).
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/post/post.c b/post/post.c
index 6687e0b75c..0f1fe8d905 100644
--- a/post/post.c
+++ b/post/post.c
@@ -189,7 +189,7 @@  static void post_get_env_flags(int *test_flags)
 		last = 0;
 		name = list;
 		while (!last) {
-			while (*name && *name == ' ')
+			while (*name == ' ')
 				name++;
 			if (*name == 0)
 				break;