mirror of
https://github.com/systemd/systemd.git
synced 2025-01-12 13:18:14 +03:00
nulstr-util: make ret_size in strv_make_nulstr() optional
This commit is contained in:
parent
6840e89a57
commit
16cda99c73
@ -88,7 +88,6 @@ int strv_make_nulstr(char * const *l, char **ret, size_t *ret_size) {
|
||||
size_t n = 0;
|
||||
|
||||
assert(ret);
|
||||
assert(ret_size);
|
||||
|
||||
STRV_FOREACH(i, l) {
|
||||
size_t z;
|
||||
@ -114,7 +113,8 @@ int strv_make_nulstr(char * const *l, char **ret, size_t *ret_size) {
|
||||
m[n] = '\0';
|
||||
|
||||
*ret = TAKE_PTR(m);
|
||||
*ret_size = n;
|
||||
if (ret_size)
|
||||
*ret_size = n;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -125,7 +125,6 @@ int set_make_nulstr(Set *s, char **ret, size_t *ret_size) {
|
||||
_cleanup_free_ char **strv = NULL;
|
||||
|
||||
assert(ret);
|
||||
assert(ret_size);
|
||||
|
||||
strv = set_get_strv(s);
|
||||
if (!strv)
|
||||
|
Loading…
Reference in New Issue
Block a user