diff options
author | Luca Boccassi <bluca@debian.org> | 2023-11-03 17:59:32 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2023-11-03 17:59:58 +0100 |
commit | a39cba252ede11013b600dd858c9459bb707d663 (patch) | |
tree | 9e1f538267192f096981a2b3b1aa2b93fb568388 /src/basic/strv.h | |
parent | NEWS: add entry for vmspawn (diff) | |
download | systemd-a39cba252ede11013b600dd858c9459bb707d663.tar.xz systemd-a39cba252ede11013b600dd858c9459bb707d663.zip |
strv: add strv_free_many() to be used with CLEANUP_ARRAY()
Diffstat (limited to '')
-rw-r--r-- | src/basic/strv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/strv.h b/src/basic/strv.h index 544d46a3f8..fec2616733 100644 --- a/src/basic/strv.h +++ b/src/basic/strv.h @@ -32,6 +32,8 @@ char** strv_free_erase(char **l); DEFINE_TRIVIAL_CLEANUP_FUNC(char**, strv_free_erase); #define _cleanup_strv_free_erase_ _cleanup_(strv_free_erasep) +void strv_free_many(char ***strvs, size_t n); + char** strv_copy_n(char * const *l, size_t n); static inline char** strv_copy(char * const *l) { return strv_copy_n(l, SIZE_MAX); |