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);  
> +    }






2009/8/23 Filip Navara <filip.navara@gmail.com>
On Fri, Aug 21, 2009 at 5:57 PM, <sginsberg@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.

_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev



--
----------------------------------------
Wladimir A. Jiménez B.
http://www.kasbeel.cl
Linux User # 444661
Ubuntu User # 19201