summaryrefslogtreecommitdiffstats
path: root/src/basic/cap-list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/cap-list.c')
-rw-r--r--src/basic/cap-list.c7
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;
}