Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jul 2020 13:26:15 +0000 (UTC)
From:      Eric van Gyzen <vangyzen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363221 - head/contrib/ofed/libibverbs/examples
Message-ID:  <202007151326.06FDQFmN017658@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202007151326.06FDQFmN017658>