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