From c4046fb22756f0b3c76259a9c72fc88c57572284 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Sun, 17 Nov 2013 21:58:48 +0000 Subject: [PATCH] [NTOS:MM] - Fix some MSVC warnings svn path=/trunk/; revision=61022 --- reactos/ntoskrnl/mm/ARM3/pool.c | 30 ++++++++++++++++++------------ reactos/ntoskrnl/mm/ARM3/sysldr.c | 6 ++++-- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/reactos/ntoskrnl/mm/ARM3/pool.c b/reactos/ntoskrnl/mm/ARM3/pool.c index 8d01492a777..547891224d5 100644 --- a/reactos/ntoskrnl/mm/ARM3/pool.c +++ b/reactos/ntoskrnl/mm/ARM3/pool.c @@ -724,8 +724,9 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, (FreeEntry->Size << PAGE_SHIFT)); /* Remove the item from the list, depending if pool is protected */ - MmProtectFreedNonPagedPool ? - MiProtectedPoolRemoveEntryList(&FreeEntry->List) : + if (MmProtectFreedNonPagedPool) + MiProtectedPoolRemoveEntryList(&FreeEntry->List); + else RemoveEntryList(&FreeEntry->List); // @@ -738,8 +739,9 @@ MiAllocatePoolPages(IN POOL_TYPE PoolType, if (i >= MI_MAX_FREE_PAGE_LISTS) i = MI_MAX_FREE_PAGE_LISTS - 1; /* Insert the entry into the free list head, check for prot. pool */ - MmProtectFreedNonPagedPool ? - MiProtectedPoolInsertList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List, TRUE) : + if (MmProtectFreedNonPagedPool) + MiProtectedPoolInsertList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List, TRUE); + else InsertTailList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List); /* Is freed non paged pool protected? */ @@ -1085,8 +1087,9 @@ MiFreePoolPages(IN PVOID StartingVa) FreePages += FreeEntry->Size; /* Remove the item from the list, depending if pool is protected */ - MmProtectFreedNonPagedPool ? - MiProtectedPoolRemoveEntryList(&FreeEntry->List) : + if (MmProtectFreedNonPagedPool) + MiProtectedPoolRemoveEntryList(&FreeEntry->List); + else RemoveEntryList(&FreeEntry->List); } @@ -1165,8 +1168,9 @@ MiFreePoolPages(IN PVOID StartingVa) if (FreeEntry->Size < (MI_MAX_FREE_PAGE_LISTS - 1)) { /* Remove the item from the list, depending if pool is protected */ - MmProtectFreedNonPagedPool ? - MiProtectedPoolRemoveEntryList(&FreeEntry->List) : + if (MmProtectFreedNonPagedPool) + MiProtectedPoolRemoveEntryList(&FreeEntry->List); + else RemoveEntryList(&FreeEntry->List); // @@ -1181,8 +1185,9 @@ MiFreePoolPages(IN PVOID StartingVa) if (i >= MI_MAX_FREE_PAGE_LISTS) i = MI_MAX_FREE_PAGE_LISTS - 1; /* Insert the entry into the free list head, check for prot. pool */ - MmProtectFreedNonPagedPool ? - MiProtectedPoolInsertList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List, TRUE) : + if (MmProtectFreedNonPagedPool) + MiProtectedPoolInsertList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List, TRUE); + else InsertTailList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List); } else @@ -1212,8 +1217,9 @@ MiFreePoolPages(IN PVOID StartingVa) if (i >= MI_MAX_FREE_PAGE_LISTS) i = MI_MAX_FREE_PAGE_LISTS - 1; /* Insert the entry into the free list head, check for prot. pool */ - MmProtectFreedNonPagedPool ? - MiProtectedPoolInsertList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List, TRUE) : + if (MmProtectFreedNonPagedPool) + MiProtectedPoolInsertList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List, TRUE); + else InsertTailList(&MmNonPagedPoolFreeListHead[i], &FreeEntry->List); } diff --git a/reactos/ntoskrnl/mm/ARM3/sysldr.c b/reactos/ntoskrnl/mm/ARM3/sysldr.c index 61342061f5f..537d269e560 100644 --- a/reactos/ntoskrnl/mm/ARM3/sysldr.c +++ b/reactos/ntoskrnl/mm/ARM3/sysldr.c @@ -557,8 +557,10 @@ MiProcessLoaderEntry(IN PLDR_DATA_TABLE_ENTRY LdrEntry, OldIrql = KeAcquireSpinLockRaiseToSynch(&PsLoadedModuleSpinLock); /* Insert or remove from the list */ - Insert ? InsertTailList(&PsLoadedModuleList, &LdrEntry->InLoadOrderLinks) : - RemoveEntryList(&LdrEntry->InLoadOrderLinks); + if (Insert) + InsertTailList(&PsLoadedModuleList, &LdrEntry->InLoadOrderLinks); + else + RemoveEntryList(&LdrEntry->InLoadOrderLinks); /* Release locks */ KeReleaseSpinLock(&PsLoadedModuleSpinLock, OldIrql);