From 1e7c8fe494533043c52e62021e7a6fa8d935a8eb Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 12 Feb 2024 01:13:50 +0900 Subject: [PATCH] udev-util: use device_get_property_bool() at one more place --- src/shared/udev-util.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/shared/udev-util.c b/src/shared/udev-util.c index 4f4b675a37b..922364b0012 100644 --- a/src/shared/udev-util.c +++ b/src/shared/udev-util.c @@ -232,13 +232,11 @@ int device_is_renaming(sd_device *dev) { assert(dev); - r = sd_device_get_property_value(dev, "ID_RENAMING", NULL); + r = device_get_property_bool(dev, "ID_RENAMING"); if (r == -ENOENT) - return false; - if (r < 0) - return r; + return false; /* defaults to false */ - return true; + return r; } bool device_for_action(sd_device *dev, sd_device_action_t a) { -- 2.47.3