summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2016-04-13 00:43:41 +0300
committerDoug Ledford <dledford@redhat.com>2016-05-14 02:39:59 +0300
commit825107a237bd0a1589e5af3853a14ba61bef02ef (patch)
treee01644d5a8e30fe1469489a2b1c34f8db288d0fa /drivers/infiniband/core
parent54f5c9c52d69afa55abf2b034df8d45f588466c3 (diff)
downloadlinux-825107a237bd0a1589e5af3853a14ba61bef02ef.tar.xz
iwcm: Fix a sparse warning
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>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r--drivers/infiniband/core/iwcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c
index e28a160cdab0..fe0bd6c9df3d 100644
--- a/drivers/infiniband/core/iwcm.c
+++ b/drivers/infiniband/core/iwcm.c
@@ -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 =