All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] jffs2:jffs2_1pass.c: remove double braces
@ 2014-06-10 22:40 Jeroen Hofstee
  2014-06-11 22:20 ` [U-Boot] " Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Jeroen Hofstee @ 2014-06-10 22:40 UTC (permalink / raw)
  To: u-boot

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.

Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 fs/jffs2/jffs2_1pass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jffs2/jffs2_1pass.c b/fs/jffs2/jffs2_1pass.c
index 3fb5db3..b1d6470 100644
--- a/fs/jffs2/jffs2_1pass.c
+++ b/fs/jffs2/jffs2_1pass.c
@@ -724,7 +724,7 @@ jffs2_1pass_read_inode(struct b_lists *pL, u32 inode, char *dest)
 	for (b = pL->frag.listHead; b != NULL; b = b->next) {
 		jNode = (struct jffs2_raw_inode *) get_node_mem(b->offset,
 								pL->readbuf);
-		if ((inode == jNode->ino)) {
+		if (inode == jNode->ino) {
 #if 0
 			putLabeledWord("\r\n\r\nread_inode: totlen = ", jNode->totlen);
 			putLabeledWord("read_inode: inode = ", jNode->ino);
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] jffs2:jffs2_1pass.c: remove double braces
  2014-06-10 22:40 [U-Boot] [PATCH] jffs2:jffs2_1pass.c: remove double braces Jeroen Hofstee
@ 2014-06-11 22:20 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2014-06-11 22:20 UTC (permalink / raw)
  To: u-boot

On Wed, Jun 11, 2014 at 12:40:25AM +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.
> 
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140611/0f53e134/attachment.pgp>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-11 22:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-10 22:40 [U-Boot] [PATCH] jffs2:jffs2_1pass.c: remove double braces Jeroen Hofstee
2014-06-11 22:20 ` [U-Boot] " Tom Rini

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.