summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-08-24 14:31:41 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-09-11 12:45:21 +0900
commit33a03e6effb01693adf3f609760e6b34a8db659a (patch)
treef57afcf40c89d12d5b9d8b84202afab618fc05b5
parent1b6374d285124f42606d40f36c78695c42264dd1 (diff)
downloadsystemd-33a03e6effb01693adf3f609760e6b34a8db659a.tar.gz
libudev-device: fix return value of udev_device_has_tag()
-rw-r--r--src/libudev/libudev-device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 6398cd2fab..29f7f0ebde 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;
}