passwdqc: drop 'sym_' prefix from cleanup function

This also drops unnecessary symbols in header.
This commit is contained in:
Yu Watanabe
2025-10-25 11:53:41 +09:00
parent 56b52c00e3
commit 7d7b1755e9
2 changed files with 5 additions and 15 deletions
+5 -3
View 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;
@@ -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);