VirtualBox

Changeset 41031 in vbox for trunk/src/VBox/Runtime/testcase


Ignore:
Timestamp:
Apr 23, 2012 6:36:11 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
77593
Message:

RT_MIN evaluates one of its parameters twice

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstRTMemWipe.cpp

    r40365 r41031  
    6969            continue;
    7070        }
    71         RTMemWipeThoroughly(pvWipe, RT_MIN(cbAlloc, RTRandU32Ex(1, cbAlloc)),
    72                             p /* Passes */);
     71        size_t cbWipeRand = RTRandU32Ex(1, cbAlloc);
     72        RTMemWipeThoroughly(pvWipe, RT_MIN(cbAlloc, cbWipeRand), p /* Passes */);
    7373        if (!memcmp(pvWipe, pvBuf, cbAlloc))
    7474            RTTestIFailed("Memory blocks must differ (%z bytes, 0x%p vs. 0x%p)!\n",
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