Author: mkupfer
Date: Sat Aug 22 11:26:13 2009
New Revision: 42838
URL:
http://svn.reactos.org/svn/reactos?rev=42838&view=rev
Log:
- halve and round up (improved version) ;-)
Modified:
trunk/reactos/drivers/network/ndis/ndis/config.c
Modified: trunk/reactos/drivers/network/ndis/ndis/config.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/config.c [iso-8859-1] Sat Aug 22 11:26:13
2009
@@ -704,15 +704,8 @@
}
while (j < str.Length && str.Buffer[j] != '\0') j++;
-
- if ((j % 2) == 0)
- {
- *NetworkAddressLength = (UINT)(j/2);
- }
- else
- {
- *NetworkAddressLength = (UINT)((j/2)+1);
- }
+
+ *NetworkAddressLength = (j+1) >> 1;
if ((*NetworkAddressLength) == 0)
{