Skip to content

Commit f94fce8

Browse files
committed
In qual2kw() use TLS for the static buffer props.
1 parent f4d6ab3 commit f94fce8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gencode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -883,8 +883,8 @@ static const char *
883883
qual2kw(const char *kind, const unsigned id, const char *tokens[],
884884
const size_t size)
885885
{
886-
static char buf[4][64];
887-
static int idx = 0;
886+
static thread_local char buf[4][64];
887+
static thread_local int idx = 0;
888888

889889
if (id < size && tokens[id])
890890
return tokens[id];

0 commit comments

Comments
 (0)