fix compile error
This commit is contained in:
parent
133df75cec
commit
8178a81a34
|
@ -546,7 +546,12 @@ static FORCE_INLINE int32_t getSkipListNodeRandomHeight(SSkipList *pSkipList) {
|
||||||
const uint32_t factor = 4;
|
const uint32_t factor = 4;
|
||||||
|
|
||||||
int32_t n = 1;
|
int32_t n = 1;
|
||||||
|
|
||||||
|
#if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32)
|
||||||
|
while ((rand() % factor) == 0 && n <= pSkipList->maxLevel) {
|
||||||
|
#else
|
||||||
while ((rand_r(&(pSkipList->seed)) % factor) == 0 && n <= pSkipList->maxLevel) {
|
while ((rand_r(&(pSkipList->seed)) % factor) == 0 && n <= pSkipList->maxLevel) {
|
||||||
|
#endif
|
||||||
n++;
|
n++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue