Author: weiden
Date: Sun Jan 21 22:44:42 2007
New Revision: 25566
URL:
http://svn.reactos.org/svn/reactos?rev=25566&view=rev
Log:
Fix the NdisQueryBufferOffset and the ARGUMENTS_PRESENT macro
Modified:
trunk/reactos/include/ddk/ndis.h
trunk/reactos/include/ddk/winddk.h
Modified: trunk/reactos/include/ddk/ndis.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ndis.h?rev=255…
==============================================================================
--- trunk/reactos/include/ddk/ndis.h (original)
+++ trunk/reactos/include/ddk/ndis.h Sun Jan 21 22:44:42 2007
@@ -1806,7 +1806,7 @@
VirtualAddress, \
Length) \
{ \
- if (VirtualAddress) \
+ if (ARGUMENT_PRESENT(VirtualAddress)) \
*((PVOID*)VirtualAddress) = MmGetSystemAddressForMdl(Buffer); \
\
*((PUINT)Length) = MmGetMdlByteCount(Buffer); \
@@ -2032,7 +2032,7 @@
OUT PUINT TotalPacketLength OPTIONAL)
{
if (FirstBuffer)
- *((PNDIS_BUFFER*)FirstBuffer) = Packet->Private.Head;
+ *FirstBuffer = Packet->Private.Head;
if (TotalPacketLength || BufferCount || PhysicalBufferCount)
{
if (!Packet->Private.ValidCounts)
@@ -2060,14 +2060,14 @@
}
if (PhysicalBufferCount)
- *((PUINT)PhysicalBufferCount) = Packet->Private.PhysicalCount;
+ *PhysicalBufferCount = Packet->Private.PhysicalCount;
if (BufferCount)
- *((PUINT)BufferCount) = Packet->Private.Count;
+ *BufferCount = Packet->Private.Count;
if (TotalPacketLength)
- *((PUINT)TotalPacketLength) = Packet->Private.TotalLength;
- }
+ *TotalPacketLength = Packet->Private.TotalLength;
+ }
}
/*
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=2…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h (original)
+++ trunk/reactos/include/ddk/winddk.h Sun Jan 21 22:44:42 2007
@@ -5429,7 +5429,7 @@
*/
#define ARGUMENT_PRESENT(ArgumentPointer) \
- ((BOOLEAN) ((PVOID)ArgumentPointer != (PVOID)NULL))
+ ((CHAR*)((ULONG_PTR)(ArgumentPointer)) != (CHAR*)NULL)
/*
* ULONG