[MKHIVE] Fix cases where 'rc' was used without being initialized.
[reactos.git] / sdk / tools / mkhive / registry.c
index c188d7a..ad0aafc 100644 (file)
@@ -572,6 +572,7 @@ RegDeleteKeyW(
     else
     {
         hTargetKey = hKey;
+        rc = ERROR_SUCCESS;
     }
 
     /* Don't allow deleting the root */
@@ -618,6 +619,8 @@ RegDeleteKeyW(
                 /* Release the cell */
                 HvReleaseCell(Hive, ParentCell);
             }
+
+            rc = ERROR_SUCCESS;
         }
         else
         {