[openib-general] [PATCH 4/13] osm: port to WinIB stack : osmtest/osmtest.c

Michael S. Tsirkin mst at mellanox.co.il
Sun Sep 17 11:55:43 PDT 2006


Quoting r. Eitan Zahavi <eitan at mellanox.co.il>:
> Subject: Re: [openib-general] [PATCH 4/13] osm: port to WinIB stack : osmtest/osmtest.c
> 
> Hi Michael,
> 
> In general I agree we could make the code a little more safe by checking 
> castings.
> But in many of the cases (not the ones with user input - 
> strtoul/strtoull) it is not required as the values are limited by the IB 
> arch.
> 
> Anyway, the patch I am sending is for WinIB migration. Just doing the 
> explicit cast does not make things any worst.
> We could take the task of cleaning these integer casts (like I did in 
> osm_pkey.c/h) but this is another patch.
> 
> EZ

I agree with that. My point was VC++ was catching some potential errors
here so need to be careful not to through that away.

-- 
MST




More information about the general mailing list