[openib-general] [PATCH] libibverbs/examples: fix parameter parsing

Michael S. Tsirkin mst at mellanox.co.il
Sun May 8 07:29:30 PDT 2005


Fix for two obvious typos in pingpong and us-pingpong parameter parsing
(found by Grant in rdma_lat code).

Signed-off-by: Michael S. Tsirkin <mst at mellanox.co.il>

Index: examples/pingpong.c
===================================================================
--- examples/pingpong.c	(revision 2278)
+++ examples/pingpong.c	(working copy)
@@ -474,7 +474,7 @@ int main(int argc, char *argv[])
 
 		case 'i':
 			ib_port = strtol(optarg, NULL, 0);
-			if (port < 0) {
+			if (ib_port < 0) {
 				usage(argv[0]);
 				return 1;
 			}
Index: examples/ud-pingpong.c
===================================================================
--- examples/ud-pingpong.c	(revision 2278)
+++ examples/ud-pingpong.c	(working copy)
@@ -473,7 +473,7 @@ int main(int argc, char *argv[])
 
 		case 'i':
 			ib_port = strtol(optarg, NULL, 0);
-			if (port < 0) {
+			if (ib_port < 0) {
 				usage(argv[0]);
 				return 1;
 			}

-- 
MST - Michael S. Tsirkin



More information about the general mailing list