Fix bug occured in regression test
This commit is contained in:
parent
09298ae36c
commit
fe9094258a
|
@ -117,7 +117,7 @@ extern "C" {
|
||||||
|
|
||||||
#define POW2(x) ((x) * (x))
|
#define POW2(x) ((x) * (x))
|
||||||
|
|
||||||
int taosRand(void);
|
uint32_t taosRand(void);
|
||||||
|
|
||||||
int32_t strdequote(char *src);
|
int32_t strdequote(char *src);
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,12 @@
|
||||||
|
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
int taosRand(void)
|
uint32_t taosRand(void)
|
||||||
{
|
{
|
||||||
return rand();
|
return rand();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int taosRand(void)
|
uint32_t taosRand(void)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
int seed;
|
int seed;
|
||||||
|
@ -50,7 +50,7 @@ int taosRand(void)
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
return seed;
|
return (uint32_t)seed;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -475,8 +475,8 @@ void taosRandStr(char* str, int32_t size) {
|
||||||
const char* set = "abcdefghijklmnopqrstuvwxyz0123456789-_.";
|
const char* set = "abcdefghijklmnopqrstuvwxyz0123456789-_.";
|
||||||
int32_t len = 39;
|
int32_t len = 39;
|
||||||
|
|
||||||
for(int32_t i = 0; i < size; ++i) {
|
for (int32_t i = 0; i < size; ++i) {
|
||||||
str[i] = set[taosRand()%len];
|
str[i] = set[taosRand() % len];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue