about summary refs log tree commit diff
path: root/ldso
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2023-04-11 09:06:27 -0400
committerRich Felker <dalias@aerifal.cx>2023-04-11 09:06:27 -0400
commit7c41047285a24a97e700b4fb5b6b69f4505e2d82 (patch)
treef0355d25ffd0ba09d1b231aa7c06faa369282d54 /ldso
parent77327ed064bd57b0e1865cd0e0364057ff4a53b4 (diff)
downloadmusl-7c41047285a24a97e700b4fb5b6b69f4505e2d82.tar.gz
musl-7c41047285a24a97e700b4fb5b6b69f4505e2d82.tar.xz
musl-7c41047285a24a97e700b4fb5b6b69f4505e2d82.zip
fix inadvertently static local var in dynlink get_lfs64
commit 246f1c811448f37a44b41cd8df8d0ef9736d95f4 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.
Diffstat (limited to 'ldso')
-rw-r--r--ldso/dynlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ldso/dynlink.c b/ldso/dynlink.c
index fde5f346..ceca3c98 100644
--- a/ldso/dynlink.c
+++ b/ldso/dynlink.c
@@ -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"