https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0af84ce12d2f11274b808…
commit 0af84ce12d2f11274b8084cf0b3573501de9d692
Author: Stanislav Motylkov <x86corez(a)gmail.com>
AuthorDate: Thu Oct 12 21:50:12 2023 +0300
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Wed Oct 18 20:18:02 2023 +0300
[NVNET] Remove NdisEqualMemory hack by linking with memcmp library
Fix suggested by Hermès Bélusca-Maïto. CORE-15872
---
drivers/network/dd/nvnet/CMakeLists.txt | 1 +
drivers/network/dd/nvnet/requests.c | 24 ------------------------
2 files changed, 1 insertion(+), 24 deletions(-)
diff --git a/drivers/network/dd/nvnet/CMakeLists.txt
b/drivers/network/dd/nvnet/CMakeLists.txt
index 81d38fe1c6e..666e29a3003 100644
--- a/drivers/network/dd/nvnet/CMakeLists.txt
+++ b/drivers/network/dd/nvnet/CMakeLists.txt
@@ -18,6 +18,7 @@ list(APPEND SOURCE
send.c)
add_library(nvnet MODULE ${SOURCE} nvnet.rc)
+target_link_libraries(nvnet memcmp)
add_pch(nvnet nvnet.h SOURCE)
set_module_type(nvnet kernelmodedriver)
add_importlibs(nvnet ndis ntoskrnl hal)
diff --git a/drivers/network/dd/nvnet/requests.c b/drivers/network/dd/nvnet/requests.c
index 4cf57fed230..f8f041274a2 100644
--- a/drivers/network/dd/nvnet/requests.c
+++ b/drivers/network/dd/nvnet/requests.c
@@ -692,30 +692,6 @@ NvNetAddWakeUpPattern(
return NDIS_STATUS_SUCCESS;
}
-static
-BOOLEAN
-NvEqualMemory(
- _In_reads_bytes_(Length) PVOID Destination,
- _In_reads_bytes_(Length) PVOID Source,
- _In_ ULONG Length)
-{
- ULONG i;
- PUCHAR Src, Dest;
-
- Src = Source;
- Dest = Destination;
- for (i = 0; i < Length; ++i)
- {
- if (Src[i] != Dest[i])
- return FALSE;
- }
-
- return TRUE;
-}
-/* 'memcmp' is unavailable for some reason */
-#undef NdisEqualMemory
-#define NdisEqualMemory NvEqualMemory
-
static
NDIS_STATUS
NvNetRemoveWakeUpPattern(