[U-Boot] [PATCH] board:keymile: remove unnecessary double braces

Clang interpretes an if condition like "if ((a = b) == NULL) as it tries to assign a value in a statement. Hence if you do "if ((something)) it warns you that you might be confused. Hence drop the double braces for plane if statements.
cc: Holger Brunck holger.brunck@keymile.com Signed-off-by: Jeroen Hofstee jeroen@myspectrum.nl --- board/keymile/common/ivm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/board/keymile/common/ivm.c b/board/keymile/common/ivm.c index bffc08b..b6b19cc 100644 --- a/board/keymile/common/ivm.c +++ b/board/keymile/common/ivm.c @@ -120,7 +120,7 @@ static int ivm_findinventorystring(int type,
/* Look for the requested number of CR. */ while ((cr != nr) && (addr < INVENTORYDATASIZE)) { - if ((buf[addr] == '\r')) + if (buf[addr] == '\r') cr++; addr++; }

On Wed, Jun 11, 2014 at 12:34:39AM +0200, Jeroen Hofstee wrote:
Clang interpretes an if condition like "if ((a = b) == NULL) as it tries to assign a value in a statement. Hence if you do "if ((something)) it warns you that you might be confused. Hence drop the double braces for plane if statements.
cc: Holger Brunck holger.brunck@keymile.com Signed-off-by: Jeroen Hofstee jeroen@myspectrum.nl
Applied to u-boot/master, thanks!
participants (2)
-
Jeroen Hofstee
-
Tom Rini