summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-monitor.c
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-02-13 18:13:22 +0100
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>2013-02-13 18:14:20 +0100
commit090be8653471e1abe3f1cdd32eaad0fbd65f85cd (patch)
tree760849764326e78d458ff7019ac8b3f2d88245d8 /src/libudev/libudev-monitor.c
parentb05105f0a80bcf2f2d18e9e33f740d7d04fca633 (diff)
use streq instead of strcmp
Diffstat (limited to 'src/libudev/libudev-monitor.c')
-rw-r--r--src/libudev/libudev-monitor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index b02ea8808c..0212792552 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -115,9 +115,9 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c
if (name == NULL)
group = UDEV_MONITOR_NONE;
- else if (strcmp(name, "udev") == 0)
+ else if (streq(name, "udev"))
group = UDEV_MONITOR_UDEV;
- else if (strcmp(name, "kernel") == 0)
+ else if (streq(name, "kernel"))
group = UDEV_MONITOR_KERNEL;
else
return NULL;
@@ -467,7 +467,7 @@ static int passes_filter(struct udev_monitor *udev_monitor, struct udev_device *
const char *devtype;
const char *ddevtype;
- if (strcmp(dsubsys, subsys) != 0)
+ if (!streq(dsubsys, subsys))
continue;
devtype = udev_list_entry_get_value(list_entry);
@@ -476,7 +476,7 @@ static int passes_filter(struct udev_monitor *udev_monitor, struct udev_device *
ddevtype = udev_device_get_devtype(udev_device);
if (ddevtype == NULL)
continue;
- if (strcmp(ddevtype, devtype) == 0)
+ if (streq(ddevtype, devtype))
goto tag;
}
return 0;