VirtualBox

Changeset 103308 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Feb 12, 2024 11:54:58 AM (11 months ago)
Author:
vboxsync
Message:

Main/testcase: Only call RTRandU64Ex() once, as RT_MIN would evaluate this twice when being called directly within it (found by Parfait). ​bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/testcase/tstGuestCtrlParseBuffer.cpp

    r102674 r103308  
    261261            if (cbToReadFromArray)
    262262                cbChunk = RT_MIN(cbChunk, cbToReadFromArray);
    263             cbChunk = RT_MIN(cbChunk, RTRandU64Ex(8, RT_MIN(sizeof(buf), 64)));
     263            size_t const cbRand            = RTRandU64Ex(8, RT_MIN(sizeof(buf), 64));
     264            cbChunk = RT_MIN(cbChunk, cbRand);
    264265            if (cbChunk)
    265266            {
Note: See TracChangeset for help on using the changeset viewer.

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