]> git.ipfire.org Git - thirdparty/systemd.git/commit
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)
commit318bf0ca75d9054de662e95db406d6b11bc36a82
treeeacd24af8e4486325a701799ae6edb205217742b
parentb8b2316b0a5d14333c1e2c1eed42c48551727bb8
parentd158595dc7e873b40d7c20bda64ebe7eb67bae69
tree-wide: move static dl handles into their dlopen_*() functions (#42168)

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()).