fix inadvertently static local var in dynlink get_lfs64

commit 246f1c8114 inadvertently
introduced the local variable p as static by declaring it together
with lfs64_list. the function is only reachable under lock, and is not
called reentrantly, so this is not a functional bug, but it is
confusing and inefficient. fix by separating the declarations.
This commit is contained in:
Rich Felker 2023-04-11 09:06:27 -04:00
parent 77327ed064
commit 7c41047285
1 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,8 @@ static struct symdef find_sym(struct dso *dso, const char *s, int need_def)
static struct symdef get_lfs64(const char *name)
{
static const char *p, lfs64_list[] =
const char *p;
static const char lfs64_list[] =
"aio_cancel\0aio_error\0aio_fsync\0aio_read\0aio_return\0"
"aio_suspend\0aio_write\0alphasort\0creat\0fallocate\0"
"fgetpos\0fopen\0freopen\0fseeko\0fsetpos\0fstat\0"