]> git.ipfire.org Git - thirdparty/systemd.git/commit
tree-wide: move static dl handles into their dlopen_*() functions 42168/head
authorDaan De Meyer <daan@amutable.com>
Sat, 16 May 2026 15:50:31 +0000 (15:50 +0000)
committerDaan De Meyer <daan@amutable.com>
Tue, 19 May 2026 19:22:06 +0000 (19:22 +0000)
commitd158595dc7e873b40d7c20bda64ebe7eb67bae69
tree460c8cb3c094a9193745dbaef66d0f794f9b3458
parente62fd8106fdc8a9542928164156e82aa86811c0b
tree-wide: move static dl handles into their dlopen_*() functions

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()).
30 files changed:
src/basic/compress.c
src/basic/gcrypt-util.c
src/libsystemd/sd-bus/test-bus-marshal.c
src/locale/xkbcommon-util.c
src/shared/acl-util.c
src/shared/apparmor-util.c
src/shared/blkid-util.c
src/shared/crypto-util.c
src/shared/cryptsetup-util.c
src/shared/curl-util.c
src/shared/elf-util.c
src/shared/fdisk-util.c
src/shared/gnutls-util.c
src/shared/libarchive-util.c
src/shared/libaudit-util.c
src/shared/libcrypt-util.c
src/shared/libfido2-util.c
src/shared/libmount-util.c
src/shared/microhttpd-util.c
src/shared/module-util.c
src/shared/pam-util.c
src/shared/password-quality-util-passwdqc.c
src/shared/password-quality-util-pwquality.c
src/shared/pcre2-util.c
src/shared/pkcs11-util.c
src/shared/qrcode-util.c
src/shared/seccomp-util.c
src/shared/selinux-util.c
src/shared/ssl-util.c
src/shared/tpm2-util.c