mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-05 09:20:29 +00:00
refactor code and less use of _rand64
This commit is contained in:
parent
99da35ab47
commit
fab02d9e5f
1 changed files with 2 additions and 2 deletions
|
@ -833,8 +833,8 @@ int LuaUuidV4(lua_State *L) {
|
|||
char v[] = {'0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
|
||||
char uuid_str[37] = {0};
|
||||
uint64_t r = 0;
|
||||
for (int i = 0, j = 16; i < 36; ++i, ++j) {
|
||||
uint64_t r = _rand();
|
||||
for (int i = 0, j = 0; i < 36; ++i, ++j) {
|
||||
|
||||
if (j == 16) {
|
||||
r = _rand64();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue