From edfbcd133bf5fe42b07710c62923e687e6e7c4a3 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 14 May 2012 22:39:58 +0000 Subject: [PATCH] [NDIS] - Fix some sickening formatting disasters - Allocate the unicode string buffers from paged pool, like everything else in the NDIS config API svn path=/trunk/; revision=56590 --- reactos/drivers/network/ndis/ndis/config.c | 24 ++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/reactos/drivers/network/ndis/ndis/config.c b/reactos/drivers/network/ndis/ndis/config.c index 3f85ab5d86d..7288a8ca4d4 100644 --- a/reactos/drivers/network/ndis/ndis/config.c +++ b/reactos/drivers/network/ndis/ndis/config.c @@ -444,10 +444,8 @@ NdisReadConfiguration( return; } - if( - !wcsncmp(Keyword->Buffer, L"Environment", Keyword->Length/sizeof(WCHAR)) && - wcslen(L"Environment") == Keyword->Length/sizeof(WCHAR) - ) + if(!wcsncmp(Keyword->Buffer, L"Environment", Keyword->Length/sizeof(WCHAR)) && + wcslen(L"Environment") == Keyword->Length/sizeof(WCHAR)) { *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); if(!*ParameterValue) @@ -483,10 +481,8 @@ NdisReadConfiguration( return; } - if( - !wcsncmp(Keyword->Buffer, L"ProcessorType", Keyword->Length/sizeof(WCHAR)) && - wcslen(L"ProcessorType") == Keyword->Length/sizeof(WCHAR) - ) + if(!wcsncmp(Keyword->Buffer, L"ProcessorType", Keyword->Length/sizeof(WCHAR)) && + wcslen(L"ProcessorType") == Keyword->Length/sizeof(WCHAR)) { *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); if(!*ParameterValue) @@ -519,10 +515,8 @@ NdisReadConfiguration( return; } - if( - !wcsncmp(Keyword->Buffer, L"NdisVersion", Keyword->Length/sizeof(WCHAR)) && - wcslen(L"NdisVersion") == Keyword->Length/sizeof(WCHAR) - ) + if(!wcsncmp(Keyword->Buffer, L"NdisVersion", Keyword->Length/sizeof(WCHAR)) && + wcslen(L"NdisVersion") == Keyword->Length/sizeof(WCHAR)) { *ParameterValue = ExAllocatePool(PagedPool, sizeof(NDIS_CONFIGURATION_PARAMETER)); if(!*ParameterValue) @@ -613,7 +607,7 @@ NdisReadConfiguration( (*ParameterValue)->ParameterType = NdisParameterBinary; - Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); + Buffer = ExAllocatePool(PagedPool, KeyInformation->DataLength); if (!Buffer) { NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); @@ -634,7 +628,7 @@ NdisReadConfiguration( (*ParameterValue)->ParameterType = NdisParameterMultiString; - Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); + Buffer = ExAllocatePool(PagedPool, KeyInformation->DataLength); if (!Buffer) { NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n")); @@ -678,7 +672,7 @@ NdisReadConfiguration( (*ParameterValue)->ParameterType = NdisParameterString; - Buffer = ExAllocatePool(NonPagedPool, KeyInformation->DataLength); + Buffer = ExAllocatePool(PagedPool, KeyInformation->DataLength); if (!Buffer) { NDIS_DbgPrint(MIN_TRACE, ("Insufficient resources.\n"));