aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-07-20 22:39:17 -0400
committerDavid S. Miller <davem@davemloft.net>2007-07-20 22:39:17 -0400
commitfc7b93800b48324667e218a4b6b784b853cf4dd7 (patch)
tree7b8512b68c888298aff7e1a44cf4be5ef36697f4 /net
parentc2e68052429fdf87702fccd272951282bef1c60a (diff)
[IPV4]: Fix inetpeer gcc-4.2 warnings
CC net/ipv4/inetpeer.o net/ipv4/inetpeer.c: In function 'unlink_from_pool': net/ipv4/inetpeer.c:297: warning: the address of 'stack' will always evaluate as 'true' net/ipv4/inetpeer.c:297: warning: the address of 'stack' will always evaluate as 'true' net/ipv4/inetpeer.c: In function 'inet_getpeer': net/ipv4/inetpeer.c:409: warning: the address of 'stack' will always evaluate as 'true' net/ipv4/inetpeer.c:409: warning: the address of 'stack' will always evaluate as 'true' "Fix" by checking for != NULL. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/inetpeer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 6cbce96a54ce..771031dfbd0f 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -158,7 +158,7 @@ static void unlink_from_unused(struct inet_peer *p)
158#define lookup(_daddr,_stack) \ 158#define lookup(_daddr,_stack) \
159({ \ 159({ \
160 struct inet_peer *u, **v; \ 160 struct inet_peer *u, **v; \
161 if (_stack) { \ 161 if (_stack != NULL) { \
162 stackptr = _stack; \ 162 stackptr = _stack; \
163 *stackptr++ = &peer_root; \ 163 *stackptr++ = &peer_root; \
164 } \ 164 } \
@@ -169,7 +169,7 @@ static void unlink_from_unused(struct inet_peer *p)
169 v = &u->avl_left; \ 169 v = &u->avl_left; \
170 else \ 170 else \
171 v = &u->avl_right; \ 171 v = &u->avl_right; \
172 if (_stack) \ 172 if (_stack != NULL) \
173 *stackptr++ = v; \ 173 *stackptr++ = v; \
174 u = *v; \ 174 u = *v; \
175 } \ 175 } \