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

Grant Grundler iod00d at hp.com
Mon May 9 10:06:54 PDT 2005


On Sun, May 08, 2005 at 05:29:30PM +0300, Michael S. Tsirkin wrote:
> Fix for two obvious typos in pingpong and us-pingpong parameter parsing
> (found by Grant in rdma_lat code).

Actually found by Bernard Fischer in rdma_lat.c.
Thanks for checking  ibv_pingpong too.

grant

> 
> 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
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general



More information about the general mailing list