VirtualBox

Changeset 67229 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Jun 2, 2017 11:18:28 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115918
Message:

IPRT: vfsprogress.cpp: fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/vfs/vfsprogress.cpp

    r67228 r67229  
    8787    uint64_t cbDone = RT_MIN(pThis->cbCurrentlyRead, pThis->cbExpectedRead)
    8888                    + RT_MIN(pThis->cbCurrentlyWritten, pThis->cbExpectedWritten);
    89     unsigned uPct = cbDone / pThis->cbExpected;
     89    unsigned uPct = cbDone * 100 / pThis->cbExpected;
    9090    if (uPct == pThis->uCurPct)
    9191        return pThis->rcCanceled;
     
    456456
    457457    uint32_t cRefs = RTVfsIoStrmRetain(hVfsIos);
    458     AssertReturn(cRefs == UINT32_MAX, VERR_INVALID_HANDLE);
     458    AssertReturn(cRefs != UINT32_MAX, VERR_INVALID_HANDLE);
    459459
    460460    PRTVFSPROGRESSFILE pThis;
     
    491491
    492492    uint32_t cRefs = RTVfsFileRetain(hVfsFile);
    493     AssertReturn(cRefs == UINT32_MAX, VERR_INVALID_HANDLE);
     493    AssertReturn(cRefs != UINT32_MAX, VERR_INVALID_HANDLE);
    494494
    495495    RTVFSIOSTREAM hVfsIos = RTVfsFileToIoStream(hVfsFile);
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