tree-wide: use strv_extend_strv_consume() where appropriate
This commit is contained in:
@@ -106,13 +106,9 @@ int unit_load_dropin(Unit *u) {
|
||||
if (r <= 0)
|
||||
return 0;
|
||||
|
||||
if (!u->dropin_paths)
|
||||
u->dropin_paths = TAKE_PTR(l);
|
||||
else {
|
||||
r = strv_extend_strv(&u->dropin_paths, l, true);
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
}
|
||||
r = strv_extend_strv_consume(&u->dropin_paths, TAKE_PTR(l), /* filter_duplicates = */ true);
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
u->dropin_mtime = 0;
|
||||
STRV_FOREACH(f, u->dropin_paths) {
|
||||
|
||||
Reference in New Issue
Block a user