]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-util: use device_get_property_bool() at one more place
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Feb 2024 16:13:50 +0000 (01:13 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 11 Feb 2024 16:13:50 +0000 (01:13 +0900)
src/shared/udev-util.c

index 4f4b675a37b9fa3a41f818aa81d2256fc6f79fe2..922364b0012ce87ef3954cd6c1265b6b566be266 100644 (file)
@@ -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) {