Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=418106d6248618bca1add65168a82974c72206db
Commit:     418106d6248618bca1add65168a82974c72206db
Parent:     5792a2856a63cdc568e08a7d6f9b2413d9217b3e
Author:     Adrian Bunk <[EMAIL PROTECTED]>
AuthorDate: Wed Apr 4 19:08:21 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Apr 4 21:12:47 2007 -0700

    [PATCH] net/sunrpc/svcsock.c: fix a check
    
    The return value of kernel_recvmsg() should be assigned to "err", not
    compared with the random value of a never initialized "err" (and the "< 0"
    check wrongly always returned false since == comparisons never have a
    result < 0).
    
    Spotted by the Coverity checker.
    
    Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>
    Acked-by: Neil Brown <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 net/sunrpc/svcsock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index f6e1eb1..593f62f 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -779,8 +779,8 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
        }
 
        clear_bit(SK_DATA, &svsk->sk_flags);
-       while ((err == kernel_recvmsg(svsk->sk_sock, &msg, NULL,
-                                     0, 0, MSG_PEEK | MSG_DONTWAIT)) < 0 ||
+       while ((err = kernel_recvmsg(svsk->sk_sock, &msg, NULL,
+                                    0, 0, MSG_PEEK | MSG_DONTWAIT)) < 0 ||
               (skb = skb_recv_datagram(svsk->sk_sk, 0, 1, &err)) == NULL) {
                if (err == -EAGAIN) {
                        svc_sock_received(svsk);
-
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