[ros-dev] [ros-diffs] [sginsberg] 42829: - svchost: #ifdef _MSC_VER doesn't mean "using Microsoft's headers" anymore - ddraw, imm32, msxml3, oleaut32, riched20: Include typeof.h for typeof emulation when compiling under MSVC and remove from React

mrnobo1024 mrnobo1024 at yahoo.com
Fri Sep 11 19:46:32 CEST 2009


--- On Fri, 9/11/09, Wladimir A. Jimenez B. <wjimenez at kasbeel.cl> wrote:

> Filip:
> 
> *NetworkAddressLength =
> (UINT)((j+1)/2); 
> Do not equal to
> > +    if ((j % 2) == 0)     //////  if  even
> > +    {
> > +        *NetworkAddressLength = (UINT)(j/2);  
> > +    }
> > +    else
> > +    {
> > +        *NetworkAddressLength = (UINT)((j/2)+1);
> > +    }

The only time when they would differ is if j == UINT_MAX (the shorter version would overflow). But that can never happen, since j is the length of a string.


      



More information about the Ros-dev mailing list