Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fc7b93800b48324667e218a4b6b784b853cf4dd7
Commit:     fc7b93800b48324667e218a4b6b784b853cf4dd7
Parent:     c2e68052429fdf87702fccd272951282bef1c60a
Author:     Patrick McHardy <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 19:39:17 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 19:39:17 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/inetpeer.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 6cbce96..771031d 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -158,7 +158,7 @@ static void unlink_from_unused(struct inet_peer *p)
 #define lookup(_daddr,_stack)                                  \
 ({                                                             \
        struct inet_peer *u, **v;                               \
-       if (_stack) {                                           \
+       if (_stack != NULL) {                                   \
                stackptr = _stack;                              \
                *stackptr++ = &peer_root;                       \
        }                                                       \
@@ -169,7 +169,7 @@ static void unlink_from_unused(struct inet_peer *p)
                        v = &u->avl_left;                       \
                else                                            \
                        v = &u->avl_right;                      \
-               if (_stack)                                     \
+               if (_stack != NULL)                             \
                        *stackptr++ = v;                        \
                u = *v;                                         \
        }                                                       \
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to