Author: jgardou
Date: Tue Sep 30 20:00:00 2014
New Revision: 64416
URL:
http://svn.reactos.org/svn/reactos?rev=64416&view=rev
Log:
[NTOS/CM]
- Put the loop inside SEH, and not vice-versa.
Modified:
trunk/reactos/ntoskrnl/config/cmapi.c
Modified: trunk/reactos/ntoskrnl/config/cmapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmapi.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/cmapi.c [iso-8859-1] Tue Sep 30 20:00:00 2014
@@ -1556,12 +1556,13 @@
/* Do the real copy */
KeyNameInfo->NameLength = 0;
CurrentKcb = Kcb;
- while (CurrentKcb)
- {
- ULONG NameLength;
-
- _SEH2_TRY
- {
+
+ _SEH2_TRY
+ {
+ while (CurrentKcb)
+ {
+ ULONG NameLength;
+
if (CurrentKcb->NameBlock->Compressed)
{
NameLength = CmpCompressedNameSize(CurrentKcb->NameBlock->Name,
CurrentKcb->NameBlock->NameLength);
@@ -1585,15 +1586,15 @@
/* Add path separator */
KeyNameInfo->Name[NeededLength/sizeof(WCHAR)] = OBJ_NAME_PATH_SEPARATOR;
KeyNameInfo->NameLength += NameLength + sizeof(OBJ_NAME_PATH_SEPARATOR);
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- return _SEH2_GetExceptionCode();
- }
- _SEH2_END;
-
- CurrentKcb = CurrentKcb->ParentKcb;
- }
+
+ CurrentKcb = CurrentKcb->ParentKcb;
+ }
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ return _SEH2_GetExceptionCode();
+ }
+ _SEH2_END;
/* Make sure we copied everything */
ASSERT(NeededLength == 0);