diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-02-20 11:33:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-02-20 16:13:49 +0100 |
commit | 8142d73574b4743081e096bf15bee65e8214b656 (patch) | |
tree | b57b47b136d6cf72d5847c9b9c3e1620a7d03e97 /src/basic/cap-list.c | |
parent | Merge pull request #26437 from DaanDeMeyer/repart-exclude (diff) | |
download | systemd-8142d73574b4743081e096bf15bee65e8214b656.tar.xz systemd-8142d73574b4743081e096bf15bee65e8214b656.zip |
cap-list: rename capability_set_to_string_alloc() → capability_set_to_string()
We typically don't use the _alloc() suffix anymore for anything, hence
drop it here too.
Diffstat (limited to 'src/basic/cap-list.c')
-rw-r--r-- | src/basic/cap-list.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/basic/cap-list.c b/src/basic/cap-list.c index fb1ad14fd3..b764d23cca 100644 --- a/src/basic/cap-list.c +++ b/src/basic/cap-list.c @@ -56,11 +56,11 @@ int capability_list_length(void) { return (int) ELEMENTSOF(capability_names); } -int capability_set_to_string_alloc(uint64_t set, char **s) { +int capability_set_to_string(uint64_t set, char **ret) { _cleanup_free_ char *str = NULL; size_t n = 0; - assert(s); + assert(ret); for (unsigned i = 0; i <= cap_last_cap(); i++) if (set & (UINT64_C(1) << i)) { @@ -88,8 +88,7 @@ int capability_set_to_string_alloc(uint64_t set, char **s) { str[n > 0 ? n - 1 : 0] = '\0'; /* truncate the last space, if it's there */ - *s = TAKE_PTR(str); - + *ret = TAKE_PTR(str); return 0; } |