aboutsummaryrefslogtreecommitdiff
path: root/contrib/ofed
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ofed')
-rw-r--r--contrib/ofed/libibverbs/examples/rc_pingpong.c2
-rw-r--r--contrib/ofed/libibverbs/examples/srq_pingpong.c2
-rw-r--r--contrib/ofed/libibverbs/examples/uc_pingpong.c2
-rw-r--r--contrib/ofed/libibverbs/examples/ud_pingpong.c2
-rw-r--r--contrib/ofed/libibverbs/examples/xsrq_pingpong.c2
5 files changed, 5 insertions, 5 deletions
diff --git a/contrib/ofed/libibverbs/examples/rc_pingpong.c b/contrib/ofed/libibverbs/examples/rc_pingpong.c
index fc95311aaf40..12e427d6bd5e 100644
--- a/contrib/ofed/libibverbs/examples/rc_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/rc_pingpong.c
@@ -273,7 +273,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
return NULL;
}
- if (listen(sockfd, 1)) {
+ if (listen(sockfd, 1) < 0) {
perror("listen() failed");
close(sockfd);
return NULL;
diff --git a/contrib/ofed/libibverbs/examples/srq_pingpong.c b/contrib/ofed/libibverbs/examples/srq_pingpong.c
index 2df8a2e3959c..703ebd6077c5 100644
--- a/contrib/ofed/libibverbs/examples/srq_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/srq_pingpong.c
@@ -283,7 +283,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
return NULL;
}
- if (listen(sockfd, 1)) {
+ if (listen(sockfd, 1) < 0) {
perror("listen() failed");
close(sockfd);
return NULL;
diff --git a/contrib/ofed/libibverbs/examples/uc_pingpong.c b/contrib/ofed/libibverbs/examples/uc_pingpong.c
index d6b2c5fdc26a..5eed25a2c25f 100644
--- a/contrib/ofed/libibverbs/examples/uc_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/uc_pingpong.c
@@ -247,7 +247,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
return NULL;
}
- if (listen(sockfd, 1)) {
+ if (listen(sockfd, 1) < 0) {
perror("listen() failed");
close(sockfd);
return NULL;
diff --git a/contrib/ofed/libibverbs/examples/ud_pingpong.c b/contrib/ofed/libibverbs/examples/ud_pingpong.c
index cb9f6037bb1f..0dec9a34980c 100644
--- a/contrib/ofed/libibverbs/examples/ud_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/ud_pingpong.c
@@ -245,7 +245,7 @@ static struct pingpong_dest *pp_server_exch_dest(struct pingpong_context *ctx,
return NULL;
}
- if (listen(sockfd, 1)) {
+ if (listen(sockfd, 1) < 0) {
perror("listen() failed");
close(sockfd);
return NULL;
diff --git a/contrib/ofed/libibverbs/examples/xsrq_pingpong.c b/contrib/ofed/libibverbs/examples/xsrq_pingpong.c
index 31b2d0edeb36..4247f84ad1b5 100644
--- a/contrib/ofed/libibverbs/examples/xsrq_pingpong.c
+++ b/contrib/ofed/libibverbs/examples/xsrq_pingpong.c
@@ -630,7 +630,7 @@ static int pp_server_connect(int port)
return 1;
}
- if (listen(sockfd, ctx.num_clients)) {
+ if (listen(sockfd, ctx.num_clients) < 0) {
perror("listen() failed");
close(sockfd);
return 1;