iwcm: Fix a sparse warning
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 12 Apr 2016 21:43:41 +0000 (14:43 -0700)
committerDoug Ledford <dledford@redhat.com>
Fri, 13 May 2016 23:39:59 +0000 (19:39 -0400)
Avoid that sparse complains about the comparison of s_addr
with INADDR_ANY.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Steve Wise <swise@opengridcomputing.com>
Cc: Faisal Latif <faisal.latif@intel.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/iwcm.c

index e28a160cdab03650441cd0ff48b44e0cffce9a68..fe0bd6c9df3d22bb8e717e3ddad7a88799057062 100644 (file)
@@ -459,7 +459,7 @@ static void iw_cm_check_wildcard(struct sockaddr_storage *pm_addr,
        if (pm_addr->ss_family == AF_INET) {
                struct sockaddr_in *pm4_addr = (struct sockaddr_in *)pm_addr;
 
-               if (pm4_addr->sin_addr.s_addr == INADDR_ANY) {
+               if (pm4_addr->sin_addr.s_addr == htonl(INADDR_ANY)) {
                        struct sockaddr_in *cm4_addr =
                                (struct sockaddr_in *)cm_addr;
                        struct sockaddr_in *cm4_outaddr =