diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-10-15 10:02:35 -0400 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-10-19 23:13:07 +0200 |
commit | ab84f5b95e10e8ffa115696ddf29c48440c5bae4 (patch) | |
tree | a156b9b64ef953463e97d3722e70f638a2efff0e /src/basic/util.h | |
parent | 1602b008531ba6e0c704588cb2643daef26b71d9 (diff) |
strv: Add _cleanup_strv_free_erase_ and _cleanup_string_free_erase_
Diffstat (limited to 'src/basic/util.h')
-rw-r--r-- | src/basic/util.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/util.h b/src/basic/util.h index b1c64675e0..4b1c5878c5 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -946,4 +946,7 @@ bool oom_score_adjust_is_valid(int oa); #define memory_erase(p, l) memset((p), 'x', (l)) void string_erase(char *x); -void strv_erase(char **l); + +char *string_free_erase(char *s); +DEFINE_TRIVIAL_CLEANUP_FUNC(char *, string_free_erase); +#define _cleanup_string_free_erase_ _cleanup_(string_free_erasep) |