[NDIS] Use FORCEINLINE instead of __inline

This commit is contained in:
Jérôme Gardou 2020-11-09 09:15:57 +01:00 committed by Jérôme Gardou
parent 15c9f63b65
commit 378642eb4f
2 changed files with 10 additions and 8 deletions

View file

@ -10,7 +10,9 @@
#include <ndissys.h>
__inline ULONG SkipToOffset(
FORCEINLINE
ULONG
SkipToOffset(
IN PNDIS_BUFFER Buffer,
IN UINT Offset,
IN OUT PUCHAR *Data,
@ -481,7 +483,7 @@ NdisAllocatePacketPoolEx(
NumberOfDescriptors = 0xffff;
}
Length = sizeof(NDIS_PACKET) + sizeof(NDIS_PACKET_OOB_DATA) +
Length = sizeof(NDIS_PACKET) + sizeof(NDIS_PACKET_OOB_DATA) +
sizeof(NDIS_PACKET_EXTENSION) + ProtocolReservedLength;
Size = sizeof(NDISI_PACKET_POOL) + Length * NumberOfDescriptors;
@ -1163,7 +1165,7 @@ EXPORT
NdisPacketSize(
IN UINT ProtocolReservedSize)
{
return sizeof(NDIS_PACKET) + sizeof(NDIS_PACKET_OOB_DATA) +
return sizeof(NDIS_PACKET) + sizeof(NDIS_PACKET_OOB_DATA) +
sizeof(NDIS_PACKET_EXTENSION) + ProtocolReservedSize;
}

View file

@ -125,14 +125,14 @@ typedef struct _NDIS_HANDLE_OBJECT
PVOID MapBuffer;
} NDIS_HANDLE_OBJECT, *PNDIS_HANDLE_OBJECT;
__inline
FORCEINLINE
PNDIS_HANDLE_OBJECT
NDIS_HANDLE_TO_POBJECT ( NDIS_HANDLE handle )
{
return (PNDIS_HANDLE_OBJECT)handle;
}
__inline
FORCEINLINE
NDIS_HANDLE
NDIS_POBJECT_TO_HANDLE ( PNDIS_HANDLE_OBJECT obj )
{
@ -289,7 +289,7 @@ NdisOpenFile(
FILE_SYNCHRONOUS_IO_NONALERT, // ULONG CreateOptions
0, // PVOID EaBuffer
0 ); // ULONG EaLength
if ( !NT_SUCCESS(*Status) )
{
NDIS_DbgPrint(MIN_TRACE, ("ZwCreateFile failed (%x) Name %wZ\n", *Status, FileName));
@ -346,7 +346,7 @@ NdisGetCurrentProcessorCounts(
{
NDIS_DbgPrint(MAX_TRACE, ("Called.\n"));
ExGetCurrentProcessorCounts( (PULONG) pIdleCount, (PULONG) pKernelAndUser, (PULONG) pIndex);
ExGetCurrentProcessorCounts( (PULONG) pIdleCount, (PULONG) pKernelAndUser, (PULONG) pIndex);
}
@ -356,7 +356,7 @@ NdisGetCurrentProcessorCounts(
VOID
EXPORT
NdisGetSystemUpTime(OUT PULONG pSystemUpTime)
{
{
ULONG Increment;
LARGE_INTEGER TickCount;