[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 ReactOS-generic

Filip Navara filip.navara at gmail.com
Sun Aug 23 20:26:10 CEST 2009


On Fri, Aug 21, 2009 at 5:57 PM, <sginsberg at svn.reactos.org> wrote:
> --- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original)
> +++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Fri Aug 21 17:57:26 2009
> @@ -705,7 +705,14 @@
>
>     while (j < str.Length && str.Buffer[j] != '\0') j++;
>
> -    *NetworkAddressLength = (UINT)((j/2)+0.5);
> +    if ((j % 2) == 0)
> +    {
> +        *NetworkAddressLength = (UINT)(j/2);
> +    }
> +    else
> +    {
> +        *NetworkAddressLength = (UINT)((j/2)+1);
> +    }

Why not use  *NetworkAddressLength = (UINT)((j+1)/2); unconditionally?

>
>     if ((*NetworkAddressLength) == 0)
>     {
>

F.



More information about the Ros-dev mailing list