Author: hbelusca
Date: Fri Jan 4 12:54:39 2013
New Revision: 58112
URL:
http://svn.reactos.org/svn/reactos?rev=58112&view=rev
Log:
while (TRUE); (when something is unimplemented) ---> ASSERT(FALSE); // while (TRUE);
and in some cases, return an adequate value.
Part 2/2
Some while(true); remain in our code, however not in critical regions.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c
trunk/reactos/ntoskrnl/mm/ARM3/largepag.c
trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c
trunk/reactos/ntoskrnl/mm/arm/page.c
trunk/reactos/ntoskrnl/mm/arm/stubs.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/arm/init.…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/arm/init.c [iso-8859-1] Fri Jan 4 12:54:39 2013
@@ -66,7 +66,7 @@
// Always return success for now
//
DPRINT1("NEVER TELL ME THE ODDS!\n");
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return STATUS_SUCCESS;
}
Modified: trunk/reactos/ntoskrnl/mm/ARM3/largepag.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/largepag.…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/largepag.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/largepag.c [iso-8859-1] Fri Jan 4 12:54:39 2013
@@ -59,7 +59,7 @@
for (i = 0; i < MiLargePageRangeIndex; i++)
{
DPRINT1("No support for large pages\n");
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
}
Modified: trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/sysldr.c [iso-8859-1] Fri Jan 4 12:54:39 2013
@@ -106,7 +106,8 @@
{
/* Fail */
DPRINT1("Session loading not yet supported!\n");
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
+ return STATUS_NOT_IMPLEMENTED;
}
/* Not session load, shouldn't have an entry */
@@ -1217,7 +1218,7 @@
/* We failed, unload the image */
MmUnloadSystemImage(DllEntry);
DPRINT1("MmCallDllInitialize failed with status 0x%x\n",
Status);
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
Loaded = FALSE;
}
}
@@ -1720,7 +1721,8 @@
{
/* Shouldn't happen */
DPRINT1("[Mm0]: Couldn't allocate driver section!\n");
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
+ return;
}
/* This is the new virtual address for the module */
@@ -1773,7 +1775,8 @@
{
/* This shouldn't happen */
DPRINT1("Relocations failed!\n");
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
+ return;
}
}
@@ -2922,7 +2925,8 @@
{
/* We don't support session loading yet */
DPRINT1("Unsupported Session-Load!\n");
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
+ Status = STATUS_NOT_IMPLEMENTED;
}
/* Do cleanup */
@@ -3023,7 +3027,8 @@
{
/* We don't support session loading yet */
DPRINT1("Unsupported Session-Load!\n");
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
+ goto Quickie;
}
/* Check the loader list again, we should end up in the path below */
Modified: trunk/reactos/ntoskrnl/mm/arm/page.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/page.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/arm/page.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/arm/page.c [iso-8859-1] Fri Jan 4 12:54:39 2013
@@ -125,7 +125,7 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
BOOLEAN
@@ -135,7 +135,7 @@
IN PULONG DirectoryTableBase)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return FALSE;
}
@@ -165,7 +165,7 @@
OUT PPFN_NUMBER Page)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
VOID
@@ -174,7 +174,7 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
NTSTATUS
@@ -186,7 +186,7 @@
IN ULONG PageCount)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return STATUS_SUCCESS;
}
@@ -199,7 +199,7 @@
IN ULONG PageCount)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return STATUS_SUCCESS;
}
@@ -208,7 +208,7 @@
MmRawDeleteVirtualMapping(IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
VOID
@@ -220,7 +220,7 @@
OUT PPFN_NUMBER Page)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
VOID
@@ -230,7 +230,7 @@
IN SWAPENTRY *SwapEntry)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
NTSTATUS
@@ -240,8 +240,8 @@
IN SWAPENTRY SwapEntry)
{
UNIMPLEMENTED;
- while (TRUE);
- return 0;
+ ASSERT(FALSE); // while (TRUE);
+ return STATUS_NOT_IMPLEMENTED;
}
PFN_NUMBER
@@ -250,7 +250,7 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return 0;
}
@@ -260,8 +260,8 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
- return 0;
+ ASSERT(FALSE); // while (TRUE);
+ return FALSE;
}
VOID
@@ -270,7 +270,7 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
VOID
@@ -279,7 +279,7 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
BOOLEAN
@@ -288,7 +288,7 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return FALSE;
}
@@ -298,7 +298,7 @@
IN PVOID Address)
{
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return FALSE;
}
@@ -357,7 +357,7 @@
PhysicalAddress.QuadPart = 0;
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
return PhysicalAddress;
}
Modified: trunk/reactos/ntoskrnl/mm/arm/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/stubs.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] Fri Jan 4 12:54:39 2013
@@ -375,8 +375,8 @@
// FIXME-USER: Need to delete address space
//
UNIMPLEMENTED;
- while (TRUE);
- return 0;
+ ASSERT(FALSE); // while (TRUE);
+ return STATUS_NOT_IMPLEMENTED;
}
PULONG
@@ -400,7 +400,7 @@
// TODO
//
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
VOID
@@ -412,7 +412,7 @@
// TODO
//
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
NTSTATUS
@@ -659,7 +659,7 @@
// TODO
//
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
NTSTATUS
@@ -672,8 +672,8 @@
// TODO
//
UNIMPLEMENTED;
- while (TRUE);
- return 0;
+ ASSERT(FALSE); // while (TRUE);
+ return STATUS_NOT_IMPLEMENTED;
}
PFN_NUMBER
@@ -704,8 +704,8 @@
// TODO
//
UNIMPLEMENTED;
- while (TRUE);
- return 0;
+ ASSERT(FALSE); // while (TRUE);
+ return FALSE;
}
VOID
@@ -717,7 +717,7 @@
// TODO
//
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
VOID
@@ -729,7 +729,7 @@
// TODO
//
UNIMPLEMENTED;
- while (TRUE);
+ ASSERT(FALSE); // while (TRUE);
}
BOOLEAN