Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 54612)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest.cpp	(revision 54613)
@@ -1006,7 +1006,7 @@
     pDevExt->fMouseStatusHost = UINT32_MAX;  /* forces a report */
 
-    pDevExt->u32AcquireModeGuestCaps = 0;
-    pDevExt->u32SetModeGuestCaps = 0;
-    pDevExt->u32GuestCapsAcquired = 0;
+    pDevExt->fAcquireModeGuestCaps = 0;
+    pDevExt->fSetModeGuestCaps = 0;
+    pDevExt->fAcquiredGuestCaps = 0;
     vbgdBitUsageTrackerClear(&pDevExt->SetGuestCapsTracker);
     pDevExt->fGuestCapsHost = UINT32_MAX; /* forces a report */
@@ -2532,39 +2532,37 @@
                                      uint32_t cMax, const char *pszWhat)
 {
-    bool        fGlobalChange = false;
-    uint32_t    iBit;
+    bool fGlobalChange = false;
     AssertCompile(sizeof(pTracker->acPerBitUsage) == 32 * sizeof(uint32_t));
 
-    for (iBit = ASMBitFirstSetU32(fChanged) - 1; iBit < 32; iBit++)
-    {
+    while (fChanged)
+    {
+        uint32_t const iBit     = ASMBitFirstSetU32(fChanged) - 1;
         uint32_t const fBitMask = RT_BIT_32(iBit);
-        if (fBitMask & fChanged)
-        {
-            if (fChanged & fPrevious)
+        Assert(iBit < 32); Assert(fBitMask & fChanged);
+
+        if (fBitMask & fPrevious)
+        {
+            pTracker->acPerBitUsage[iBit] -= 1;
+            AssertMsg(pTracker->acPerBitUsage[iBit] <= cMax,
+                      ("%s: acPerBitUsage[%u]=%#x cMax=%#x\n", pszWhat, iBit, pTracker->acPerBitUsage[iBit], cMax));
+            if (pTracker->acPerBitUsage[iBit] == 0)
             {
-                pTracker->acPerBitUsage[iBit] -= 1;
-                AssertMsg(pTracker->acPerBitUsage[iBit] <= cMax,
-                          ("%s: acPerBitUsage[%u]=%#x cMax=%#x\n", pszWhat, iBit, pTracker->acPerBitUsage[iBit], cMax));
-                if (pTracker->acPerBitUsage[iBit] == 0)
-                {
-                    fGlobalChange = true;
-                    pTracker->fMask &= ~fBitMask;
-                }
+                fGlobalChange = true;
+                pTracker->fMask &= ~fBitMask;
             }
-            else
+        }
+        else
+        {
+            pTracker->acPerBitUsage[iBit] += 1;
+            AssertMsg(pTracker->acPerBitUsage[iBit] > 0 && pTracker->acPerBitUsage[iBit] <= cMax,
+                      ("pTracker->acPerBitUsage[%u]=%#x cMax=%#x\n", pszWhat, iBit, pTracker->acPerBitUsage[iBit], cMax));
+            if (pTracker->acPerBitUsage[iBit] == 1)
             {
-                pTracker->acPerBitUsage[iBit] += 1;
-                AssertMsg(pTracker->acPerBitUsage[iBit] > 0 && pTracker->acPerBitUsage[iBit] <= cMax,
-                          ("pTracker->acPerBitUsage[%u]=%#x cMax=%#x\n", pszWhat, iBit, pTracker->acPerBitUsage[iBit], cMax));
-                if (pTracker->acPerBitUsage[iBit] == 1)
-                {
-                    fGlobalChange = true;
-                    pTracker->fMask |= fBitMask;
-                }
+                fGlobalChange = true;
+                pTracker->fMask |= fBitMask;
             }
-            fChanged &= ~fBitMask;
-            if (!fChanged)
-                break;
-        }
+        }
+
+        fChanged &= ~fBitMask;
     }
 
@@ -2899,11 +2897,11 @@
 
     /*
-     * Note! Reads pSession->u32AquiredGuestCaps and pDevExt->u32AcquireModeGuestCaps
+     * Note! Reads pSession->fAcquiredGuestCaps and pDevExt->fAcquireModeGuestCaps
      *       WITHOUT holding VBOXGUESTDEVEXT::SessionSpinlock.
      */
-    fAcquireModeGuestCaps = ASMAtomicUoReadU32(&pDevExt->u32AcquireModeGuestCaps);
+    fAcquireModeGuestCaps = ASMAtomicUoReadU32(&pDevExt->fAcquireModeGuestCaps);
     if (fAcquireModeGuestCaps == 0)
         return VMMDEV_EVENT_VALID_EVENT_MASK;
-    fAcquiredGuestCaps = ASMAtomicUoReadU32(&pSession->u32AquiredGuestCaps);
+    fAcquiredGuestCaps = ASMAtomicUoReadU32(&pSession->fAcquiredGuestCaps);
 
     /*
@@ -2962,5 +2960,5 @@
     uint32_t iBit;
 
-    pReq->u32OrMask = pDevExt->u32GuestCapsAcquired | pDevExt->SetGuestCapsTracker.fMask;
+    pReq->u32OrMask = pDevExt->fAcquiredGuestCaps | pDevExt->SetGuestCapsTracker.fMask;
     if (pReq->u32OrMask == pDevExt->fGuestCapsHost)
         rc = VINF_SUCCESS;
@@ -3067,6 +3065,6 @@
     RTSpinlockAcquire(pDevExt->EventSpinlock);
 
-    if (!(pDevExt->u32SetModeGuestCaps & fOrMask))
-        pDevExt->u32AcquireModeGuestCaps |= fOrMask;
+    if (!(pDevExt->fSetModeGuestCaps & fOrMask))
+        pDevExt->fAcquireModeGuestCaps |= fOrMask;
     else
     {
@@ -3101,8 +3099,8 @@
      *       failure, this is intentional.
      */
-    fCurrentOwnedCaps      = pSession->u32AquiredGuestCaps;
+    fCurrentOwnedCaps      = pSession->fAcquiredGuestCaps;
     fSessionRemovedCaps    = fCurrentOwnedCaps & fNotMask;
     fSessionAddedCaps      = fOrMask & ~fCurrentOwnedCaps;
-    fOtherConflictingCaps  = pDevExt->u32GuestCapsAcquired & ~fCurrentOwnedCaps;
+    fOtherConflictingCaps  = pDevExt->fAcquiredGuestCaps & ~fCurrentOwnedCaps;
     fOtherConflictingCaps &= fSessionAddedCaps;
 
@@ -3111,12 +3109,12 @@
         if (fSessionAddedCaps)
         {
-            pSession->u32AquiredGuestCaps |= fSessionAddedCaps;
-            pDevExt->u32GuestCapsAcquired |= fSessionAddedCaps;
+            pSession->fAcquiredGuestCaps |= fSessionAddedCaps;
+            pDevExt->fAcquiredGuestCaps  |= fSessionAddedCaps;
         }
 
         if (fSessionRemovedCaps)
         {
-            pSession->u32AquiredGuestCaps &= ~fSessionRemovedCaps;
-            pDevExt->u32GuestCapsAcquired &= ~fSessionRemovedCaps;
+            pSession->fAcquiredGuestCaps &= ~fSessionRemovedCaps;
+            pDevExt->fAcquiredGuestCaps  &= ~fSessionRemovedCaps;
         }
 
@@ -3135,11 +3133,11 @@
                     if (fSessionAddedCaps)
                     {
-                        pSession->u32AquiredGuestCaps &= ~fSessionAddedCaps;
-                        pDevExt->u32GuestCapsAcquired &= ~fSessionAddedCaps;
+                        pSession->fAcquiredGuestCaps &= ~fSessionAddedCaps;
+                        pDevExt->fAcquiredGuestCaps  &= ~fSessionAddedCaps;
                     }
                     if (fSessionRemovedCaps)
                     {
-                        pSession->u32AquiredGuestCaps |= fSessionRemovedCaps;
-                        pDevExt->u32GuestCapsAcquired |= fSessionRemovedCaps;
+                        pSession->fAcquiredGuestCaps |= fSessionRemovedCaps;
+                        pDevExt->fAcquiredGuestCaps  |= fSessionRemovedCaps;
                     }
 
@@ -3260,5 +3258,5 @@
      * (Acquire mode is only used on windows at the time of writing.)
      */
-    if (!(fOrMask & pDevExt->u32AcquireModeGuestCaps))
+    if (!(fOrMask & pDevExt->fAcquireModeGuestCaps))
 #endif
     {
Index: trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h
===================================================================
--- trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h	(revision 54612)
+++ trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuestInternal.h	(revision 54613)
@@ -216,11 +216,11 @@
      * Protected by VBOXGUESTDEVEXT::SessionSpinlock, but is unfortunately read
      * without holding the lock in a couple of places. */
-    uint32_t volatile           u32AcquireModeGuestCaps;
+    uint32_t volatile           fAcquireModeGuestCaps;
     /** Guest capabilities which have been set to "set" mode.  This just means
      * that they have been blocked from ever being set to "acquire" mode. */
-    uint32_t                    u32SetModeGuestCaps;
+    uint32_t                    fSetModeGuestCaps;
     /** Mask of all capabilities which are currently acquired by some session
      * and as such reported to the host. */
-    uint32_t                    u32GuestCapsAcquired;
+    uint32_t                    fAcquiredGuestCaps;
     /** Usage counters for guest capabilities in "set" mode. Indexed by
      *  capability bit number, one count per session using a capability. */
@@ -283,5 +283,5 @@
      * Protected by VBOXGUESTDEVEXT::SessionSpinlock, but is unfortunately read
      * without holding the lock in a couple of places. */
-    uint32_t volatile           u32AquiredGuestCaps;
+    uint32_t volatile           fAcquiredGuestCaps;
     /** Guest capabilities in "set" mode for this session.
      * These accumulated for sessions via VBOXGUESTDEVEXT::acGuestCapsSet and
