diff options
Diffstat (limited to 'src/basic/util.h')
-rw-r--r-- | src/basic/util.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/basic/util.h b/src/basic/util.h index ac74650ff6..ff39eae715 100644 --- a/src/basic/util.h +++ b/src/basic/util.h @@ -949,3 +949,10 @@ int version(void); bool fdname_is_valid(const char *s); bool oom_score_adjust_is_valid(int oa); + +#define memory_erase(p, l) memset((p), 'x', (l)) +void string_erase(char *x); + +char *string_free_erase(char *s); +DEFINE_TRIVIAL_CLEANUP_FUNC(char *, string_free_erase); +#define _cleanup_string_free_erase_ _cleanup_(string_free_erasep) |