[openib-general] [PATCH] [MINOR] perftest: send_bw: fix dangling else

Yosef Etigin yosefe at voltaire.com
Mon Jan 8 09:41:19 PST 2007


Symptom: ib_send_bw reports 'inf' bandwidth
Cause: dangling else

Signed-off-by: Yosef Etigin <yosefe at voltaire.com>
---
diff -rup a/src/userspace/perftest/send_bw.c b/src/userspace/perftest/send_bw.c
--- a/src/userspace/perftest/send_bw.c	2007-01-08 18:20:08.000000000 +0200
+++ b/src/userspace/perftest/send_bw.c	2007-01-08 18:21:06.000000000 +0200
@@ -1156,12 +1156,14 @@ int main(int argc, char *argv[])
 				rem_dest = pp_server_exch_dest(sockfd, &my_dest);
 		}
 	} else {
-		if (user_param.duplex)
+		if (user_param.duplex) {
 			if (run_iter_bi(ctx, &user_param, rem_dest, size))
 				return 18;
-		else
+		}
+		else {
 			if(run_iter_uni(ctx, &user_param, rem_dest, size))
 				return 18;
+		}
 
 		if (user_param.servername)
 			print_report(user_param.iters, size, user_param.duplex, tposted, tcompleted);
--
Yosef Etigin




More information about the general mailing list