From: Yu Watanabe Date: Fri, 24 Aug 2018 05:31:41 +0000 (+0900) Subject: libudev-device: fix return value of udev_device_has_tag() X-Git-Tag: v240~720^2~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=33a03e6effb01693adf3f609760e6b34a8db659a;p=thirdparty%2Fsystemd.git libudev-device: fix return value of udev_device_has_tag() --- diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index 6398cd2fab2..29f7f0ebde7 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -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; }