]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
passwdqc: drop 'sym_' prefix from cleanup function
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Oct 2025 02:50:58 +0000 (11:50 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Oct 2025 02:53:41 +0000 (11:53 +0900)
This also drops unnecessary symbols in header.

src/shared/password-quality-util-passwdqc.c
src/shared/password-quality-util-passwdqc.h

index 844068a4d64a33d19bf588201eacf44b18f1fbec..a161f5c8b03dde3d61a301991038fac56ce7146e 100644 (file)
@@ -19,9 +19,11 @@ DLSYM_PROTOTYPE(passwdqc_params_free) = NULL;
 DLSYM_PROTOTYPE(passwdqc_check) = NULL;
 DLSYM_PROTOTYPE(passwdqc_random) = NULL;
 
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(passwdqc_params_t*, sym_passwdqc_params_free, passwdqc_params_freep, NULL);
+
 static int pwqc_allocate_context(passwdqc_params_t **ret) {
 
-        _cleanup_(sym_passwdqc_params_freep) passwdqc_params_t *params = NULL;
+        _cleanup_(passwdqc_params_freep) passwdqc_params_t *params = NULL;
         _cleanup_free_ char *load_reason = NULL;
         int r;
 
@@ -50,7 +52,7 @@ static int pwqc_allocate_context(passwdqc_params_t **ret) {
 
 int suggest_passwords(void) {
 
-        _cleanup_(sym_passwdqc_params_freep) passwdqc_params_t *params = NULL;
+        _cleanup_(passwdqc_params_freep) passwdqc_params_t *params = NULL;
         _cleanup_strv_free_erase_ char **suggestions = NULL;
         _cleanup_(erase_and_freep) char *joined = NULL;
         int r;
@@ -86,7 +88,7 @@ int check_password_quality(
                 const char *username,
                 char **ret_error) {
 
-        _cleanup_(sym_passwdqc_params_freep) passwdqc_params_t *params = NULL;
+        _cleanup_(passwdqc_params_freep) passwdqc_params_t *params = NULL;
         const char *check_reason;
         int r;
 
index 1a0dd68e3dd5cf38fdc746873233f6c1ea9f3bf5..7e94df431898a209921859e0d4537af8820c5918 100644 (file)
@@ -6,20 +6,8 @@
 #if HAVE_PASSWDQC
 #include <passwdqc.h>
 
-#include "dlfcn-util.h"
-
-extern DLSYM_PROTOTYPE(passwdqc_params_reset);
-extern DLSYM_PROTOTYPE(passwdqc_params_load);
-extern DLSYM_PROTOTYPE(passwdqc_params_parse);
-extern DLSYM_PROTOTYPE(passwdqc_params_free);
-extern DLSYM_PROTOTYPE(passwdqc_check);
-extern DLSYM_PROTOTYPE(passwdqc_random);
-
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(passwdqc_params_t*, sym_passwdqc_params_free, NULL);
-
 int suggest_passwords(void);
 int check_password_quality(const char *password, const char *old, const char *username, char **ret_error);
-
 #endif
 
 int dlopen_passwdqc(void);