VirtualBox

Changeset 16123 in vbox


Ignore:
Timestamp:
Jan 21, 2009 11:02:05 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
41844
Message:

Typo in Guest::GetStatistic argument check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/GuestImpl.cpp

    r15152 r16123  
    288288STDMETHODIMP Guest::GetStatistic(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG *aStatVal)
    289289{
     290    CheckComArgExpr(aCpuId, aCpuId == 0);
     291    CheckComArgExpr(aStatistic, aStatistic < GuestStatisticType_MaxVal);
     292    CheckComArgOutPointerValid(aStatVal);
     293
     294    /* not available or not yet reported? */
     295    CheckComArgExpr(aStatistic, mCurrentGuestStat[aStatistic] != GUEST_STAT_INVALID);
     296
     297    *aStatVal = mCurrentGuestStat[aStatistic];
     298    return S_OK;
     299}
     300
     301STDMETHODIMP Guest::SetStatistic(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal)
     302{
    290303    CheckComArgExpr(aCpuId, aCpuId = 0);
    291304    CheckComArgExpr(aStatistic, aStatistic < GuestStatisticType_MaxVal);
    292     CheckComArgOutPointerValid(aStatVal);
    293 
    294     /* not available or not yet reported? */
    295     CheckComArgExpr(aStatistic, mCurrentGuestStat[aStatistic] != GUEST_STAT_INVALID);
    296 
    297     *aStatVal = mCurrentGuestStat[aStatistic];
    298     return S_OK;
    299 }
    300 
    301 STDMETHODIMP Guest::SetStatistic(ULONG aCpuId, GuestStatisticType_T aStatistic, ULONG aStatVal)
    302 {
    303     CheckComArgExpr(aCpuId, aCpuId = 0);
    304     CheckComArgExpr(aStatistic, aStatistic < GuestStatisticType_MaxVal);
    305305
    306306    /* internal method assumes that the caller knows what he's doing (no boundary checks) */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette