Index: /trunk/src/VBox/Main/MediumImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/MediumImpl.cpp	(revision 29617)
+++ /trunk/src/VBox/Main/MediumImpl.cpp	(revision 29618)
@@ -96,5 +96,5 @@
           setImageId(false),
           setParentId(false),
-          hostDrive(FALSE),
+          hostDrive(false),
           implicit(false),
           numCreateDiffTasks(0),
@@ -134,13 +134,13 @@
     HDDOpenMode hddOpenMode;
 
-    BOOL autoReset : 1;
+    bool autoReset : 1;
 
     /** the following members are invalid after changing UUID on open */
-    BOOL setImageId : 1;
-    BOOL setParentId : 1;
+    bool setImageId : 1;
+    bool setParentId : 1;
     const Guid imageId;
     const Guid parentId;
 
-    BOOL hostDrive : 1;
+    bool hostDrive : 1;
 
     typedef std::map <Bstr, Bstr> PropertyMap;
@@ -747,5 +747,5 @@
 
     /* cannot be a host drive */
-    m->hostDrive = FALSE;
+    m->hostDrive = false;
 
     /* No storage unit is created yet, no need to queryInfo() */
@@ -835,5 +835,5 @@
 
     /* cannot be a host drive */
-    m->hostDrive = FALSE;
+    m->hostDrive = false;
 
     /* remember the open mode (defaults to ReadWrite) */
@@ -847,7 +847,7 @@
 
     /* save the new uuid values, will be used by queryInfo() */
-    m->setImageId = aSetImageId;
+    m->setImageId = !!aSetImageId;
     unconst(m->imageId) = aImageId;
-    m->setParentId = aSetParentId;
+    m->setParentId = !!aSetParentId;
     unconst(m->parentId) = aParentId;
 
@@ -928,5 +928,5 @@
 
     /* assume not a host drive */
-    m->hostDrive = FALSE;
+    m->hostDrive = false;
 
     /* optional */
@@ -1548,6 +1548,6 @@
     if (m->pParent)
         *aAutoReset = FALSE;
-
-    *aAutoReset = m->autoReset;
+    else
+        *aAutoReset = m->autoReset;
 
     return S_OK;
@@ -1567,7 +1567,7 @@
                         m->strLocationFull.raw());
 
-    if (m->autoReset != aAutoReset)
-    {
-        m->autoReset = aAutoReset;
+    if (m->autoReset != !!aAutoReset)
+    {
+        m->autoReset = !!aAutoReset;
 
         return m->pVirtualBox->saveSettings();
@@ -3012,5 +3012,5 @@
     /* optional, only for diffs, default is false */
     if (m->pParent)
-        data.fAutoReset = !!m->autoReset;
+        data.fAutoReset = m->autoReset;
     else
         data.fAutoReset = false;
@@ -5401,5 +5401,5 @@
         pTarget->m->state = MediumState_NotCreated;
 
-        pTarget->m->autoReset = FALSE;
+        pTarget->m->autoReset = false;
 
         /* reset UUID to prevent it from being reused next time */
