Changeset 62796 in vbox for trunk/src/VBox
- Timestamp:
- Aug 1, 2016 9:09:20 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/RTDirCreateUniqueNumbered-generic.cpp
r62723 r62796 111 111 112 112 Assert(cbLeft > cchDigits); 113 uint64_t iSeq = UINT64_MAX;114 113 for (uint32_t iTry = 0; iTry <= cMaxTries; iTry++) 115 114 { 116 115 /* Try sequentially first for a little bit, then switch to random numbers. */ 116 uint64_t iSeq; 117 117 if (iTry > 20) 118 118 iSeq = RTRandU64Ex(0, uEndSeq); 119 119 else 120 120 { 121 iSeq ++;122 if ( iSeq < UINT64_MAX)121 iSeq = iTry; 122 if (uEndSeq < UINT64_MAX) 123 123 iSeq %= uEndSeq + 1; 124 124 }
Note:
See TracChangeset
for help on using the changeset viewer.