From 8ca1ed33ec8ae8f1ae2737930d15ce3efab07292 Mon Sep 17 00:00:00 2001 From: Eric van Gyzen Date: Wed, 15 Jul 2020 13:26:15 +0000 Subject: [PATCH] Fix style in r363220 Apply the style change Kostik suggested in the review. Reported by: kib MFC after: 2 weeks X-MFC with: r363220 Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D25676 --- contrib/ofed/libibverbs/examples/rc_pingpong.c | 2 +- contrib/ofed/libibverbs/examples/srq_pingpong.c | 2 +- contrib/ofed/libibverbs/examples/uc_pingpong.c | 2 +- contrib/ofed/libibverbs/examples/ud_pingpong.c | 2 +- contrib/ofed/libibverbs/examples/xsrq_pingpong.c | 2 +- 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;