]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: move static dl handles into their dlopen_*() functions (#42168)
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 20 May 2026 01:08:11 +0000 (10:08 +0900)
committerGitHub <noreply@github.com>
Wed, 20 May 2026 01:08:11 +0000 (10:08 +0900)
Each dlopen_*() wrapper kept its dl handle as a file-scope
'static void *xxx_dl = NULL;' even though only the wrapper itself
ever referenced it. Move each one inside the corresponding function
so its scope matches its actual use, leaving the rest of each
translation unit free of the unused file-scope name.

In pcre2-util.c the assert(pcre2_dl) in pattern_matches_and_log()
becomes assert(sym_pcre2_match), which carries the same invariant
(pattern_compile_and_log() ran dlopen_pcre2()).


Trivial merge