svn commit: r363221 - head/contrib/ofed/libibverbs/examples

Eric van Gyzen vangyzen at FreeBSD.org
Wed Jul 15 13:26:18 UTC 2020


Author: vangyzen
Date: Wed Jul 15 13:26:15 2020
New Revision: 363221
URL: https://svnweb.freebsd.org/changeset/base/363221

Log:
  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

Modified:
  head/contrib/ofed/libibverbs/examples/rc_pingpong.c
  head/contrib/ofed/libibverbs/examples/srq_pingpong.c
  head/contrib/ofed/libibverbs/examples/uc_pingpong.c
  head/contrib/ofed/libibverbs/examples/ud_pingpong.c
  head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c

Modified: head/contrib/ofed/libibverbs/examples/rc_pingpong.c
==============================================================================
--- head/contrib/ofed/libibverbs/examples/rc_pingpong.c	Wed Jul 15 13:17:16 2020	(r363220)
+++ head/contrib/ofed/libibverbs/examples/rc_pingpong.c	Wed Jul 15 13:26:15 2020	(r363221)
@@ -273,7 +273,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc
 		return NULL;
 	}
 
-	if (listen(sockfd, 1)) {
+	if (listen(sockfd, 1) < 0) {
 		perror("listen() failed");
 		close(sockfd);
 		return NULL;

Modified: head/contrib/ofed/libibverbs/examples/srq_pingpong.c
==============================================================================
--- head/contrib/ofed/libibverbs/examples/srq_pingpong.c	Wed Jul 15 13:17:16 2020	(r363220)
+++ head/contrib/ofed/libibverbs/examples/srq_pingpong.c	Wed Jul 15 13:26:15 2020	(r363221)
@@ -283,7 +283,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc
 		return NULL;
 	}
 
-	if (listen(sockfd, 1)) {
+	if (listen(sockfd, 1) < 0) {
 		perror("listen() failed");
 		close(sockfd);
 		return NULL;

Modified: head/contrib/ofed/libibverbs/examples/uc_pingpong.c
==============================================================================
--- head/contrib/ofed/libibverbs/examples/uc_pingpong.c	Wed Jul 15 13:17:16 2020	(r363220)
+++ head/contrib/ofed/libibverbs/examples/uc_pingpong.c	Wed Jul 15 13:26:15 2020	(r363221)
@@ -247,7 +247,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc
 		return NULL;
 	}
 
-	if (listen(sockfd, 1)) {
+	if (listen(sockfd, 1) < 0) {
 		perror("listen() failed");
 		close(sockfd);
 		return NULL;

Modified: head/contrib/ofed/libibverbs/examples/ud_pingpong.c
==============================================================================
--- head/contrib/ofed/libibverbs/examples/ud_pingpong.c	Wed Jul 15 13:17:16 2020	(r363220)
+++ head/contrib/ofed/libibverbs/examples/ud_pingpong.c	Wed Jul 15 13:26:15 2020	(r363221)
@@ -245,7 +245,7 @@ static struct pingpong_dest *pp_server_exch_dest(struc
 		return NULL;
 	}
 
-	if (listen(sockfd, 1)) {
+	if (listen(sockfd, 1) < 0) {
 		perror("listen() failed");
 		close(sockfd);
 		return NULL;

Modified: head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c
==============================================================================
--- head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c	Wed Jul 15 13:17:16 2020	(r363220)
+++ head/contrib/ofed/libibverbs/examples/xsrq_pingpong.c	Wed Jul 15 13:26:15 2020	(r363221)
@@ -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;


More information about the svn-src-all mailing list