Patchwork [U-Boot,8/8] net/net.c: cosmetic: do not use assignment in if condition

login
register
mail settings
Submitter Luca Ceresoli
Date May 4, 2011, 12:40 p.m.
Message ID <1304512847-7351-9-git-send-email-luca.ceresoli@comelit.it>
Download mbox | patch
Permalink /patch/94035/
State Accepted
Commit ccb9ebefbec68f18b4f479b774fa5f6edc2ad819
Headers show

Comments

Luca Ceresoli - May 4, 2011, 12:40 p.m.
This removes the following checkpatch issue:
 - ERROR: do not use assignment in if condition

Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Ben Warren <biggerbadderben@gmail.com>
---
 net/net.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/net/net.c b/net/net.c
index 13efa67..c17d071 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1616,7 +1616,8 @@  NetReceive(volatile uchar *inpkt, int len)
 		 * a fragment, and either the complete packet or NULL if
 		 * it is a fragment (if !CONFIG_IP_DEFRAG, it returns NULL)
 		 */
-		if (!(ip = NetDefragment(ip, &len)))
+		ip = NetDefragment(ip, &len);
+		if (!ip)
 			return;
 		/*
 		 * watch for ICMP host redirects