]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
libudev-device: fix return value of udev_device_has_tag()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 24 Aug 2018 05:31:41 +0000 (14:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 11 Sep 2018 03:45:21 +0000 (12:45 +0900)
src/libudev/libudev-device.c

index 6398cd2fab2bdcf4a15c606feab1e03993ff53f6..29f7f0ebde76f75b6d6fb04d297bcde580edc995 100644 (file)
@@ -926,9 +926,8 @@ _public_ struct udev_list_entry *udev_device_get_tags_list_entry(struct udev_dev
  *
  * Returns: 1 if the tag is found. 0 otherwise.
  **/
-_public_ int udev_device_has_tag(struct udev_device *udev_device, const char *tag)
-{
+_public_ int udev_device_has_tag(struct udev_device *udev_device, const char *tag) {
         assert_return(udev_device, 0);
 
-        return sd_device_has_tag(udev_device->device, tag);
+        return sd_device_has_tag(udev_device->device, tag) > 0;
 }