mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
core/device: use strv_consume()
This commit is contained in:
parent
b528a62863
commit
47e72170c1
@ -408,11 +408,9 @@ static int device_add_udev_wants(Unit *u, sd_device *dev) {
|
||||
if (r < 0)
|
||||
return log_unit_error_errno(u, r, "Failed to add Wants= dependency: %m");
|
||||
|
||||
r = strv_push(&added, k);
|
||||
r = strv_consume(&added, TAKE_PTR(k));
|
||||
if (r < 0)
|
||||
return log_oom();
|
||||
|
||||
k = NULL;
|
||||
}
|
||||
|
||||
if (d->state != DEVICE_DEAD)
|
||||
|
Loading…
x
Reference in New Issue
Block a user