]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pcre2-util: drop 'sym_' prefix from cleanup functions
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Oct 2025 02:28:30 +0000 (11:28 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 25 Oct 2025 02:28:30 +0000 (11:28 +0900)
src/shared/pcre2-util.c
src/shared/pcre2-util.h

index 7a80ddd9fae3e14ef159986c325c6bfba2189c2e..f2de0f6f0cf0a5137dec4c2b92fa40d613e4381a 100644 (file)
@@ -58,7 +58,7 @@ int dlopen_pcre2(void) {
 int pattern_compile_and_log(const char *pattern, PatternCompileCase case_, pcre2_code **ret) {
 #if HAVE_PCRE2
         PCRE2_SIZE erroroffset;
-        _cleanup_(sym_pcre2_code_freep) pcre2_code *p = NULL;
+        _cleanup_(pcre2_code_freep) pcre2_code *p = NULL;
         unsigned flags = 0;
         int errorcode, r;
 
@@ -71,9 +71,9 @@ int pattern_compile_and_log(const char *pattern, PatternCompileCase case_, pcre2
         if (case_ == PATTERN_COMPILE_CASE_INSENSITIVE)
                 flags = PCRE2_CASELESS;
         else if (case_ == PATTERN_COMPILE_CASE_AUTO) {
-                _cleanup_(sym_pcre2_match_data_freep) pcre2_match_data *md = NULL;
+                _cleanup_(pcre2_match_data_freep) pcre2_match_data *md = NULL;
                 bool has_case;
-                _cleanup_(sym_pcre2_code_freep) pcre2_code *cs = NULL;
+                _cleanup_(pcre2_code_freep) pcre2_code *cs = NULL;
 
                 md = sym_pcre2_match_data_create(1, NULL);
                 if (!md)
@@ -116,7 +116,7 @@ int pattern_compile_and_log(const char *pattern, PatternCompileCase case_, pcre2
 
 int pattern_matches_and_log(pcre2_code *compiled_pattern, const char *message, size_t size, size_t *ret_ovec) {
 #if HAVE_PCRE2
-        _cleanup_(sym_pcre2_match_data_freep) pcre2_match_data *md = NULL;
+        _cleanup_(pcre2_match_data_freep) pcre2_match_data *md = NULL;
         int r;
 
         assert(compiled_pattern);
index aa9b77dc1954398b58e5d43485a36ecbc971b93a..c1d8ba32752d7d3698e24bb7f94ceab08c135629 100644 (file)
@@ -18,8 +18,8 @@ extern DLSYM_PROTOTYPE(pcre2_get_error_message);
 extern DLSYM_PROTOTYPE(pcre2_match);
 extern DLSYM_PROTOTYPE(pcre2_get_ovector_pointer);
 
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(pcre2_match_data*, sym_pcre2_match_data_free, NULL);
-DEFINE_TRIVIAL_CLEANUP_FUNC_FULL(pcre2_code*, sym_pcre2_code_free, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(pcre2_match_data*, sym_pcre2_match_data_free, pcre2_match_data_freep, NULL);
+DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(pcre2_code*, sym_pcre2_code_free, pcre2_code_freep, NULL);
 #else
 
 typedef struct {} pcre2_code;