From 47e72170c1e808708b378ea83bf691d674b344ee Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 28 Apr 2022 20:41:34 +0900 Subject: [PATCH] core/device: use strv_consume() --- src/core/device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/device.c b/src/core/device.c index 21d1b50c42..81e4cdcd85 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -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) -- 2.25.1