summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/libudev-monitor.c8
-rw-r--r--src/libudev/libudev-queue.c2
-rw-r--r--src/libudev/libudev-util.c4
-rw-r--r--src/libudev/libudev.c2
4 files changed, 8 insertions, 8 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;
diff --git a/src/libudev/libudev-queue.c b/src/libudev/libudev-queue.c
index bfb4807383..0dd20313d9 100644
--- a/src/libudev/libudev-queue.c
+++ b/src/libudev/libudev-queue.c
@@ -467,7 +467,7 @@ _public_ struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_qu
udev_list_entry_add(&udev_queue->queue_list, syspath, seqnum_str);
} else {
udev_list_entry_foreach(list_entry, udev_list_get_entry(&udev_queue->queue_list)) {
- if (strcmp(seqnum_str, udev_list_entry_get_value(list_entry)) == 0) {
+ if (streq(seqnum_str, udev_list_entry_get_value(list_entry))) {
udev_list_entry_delete(list_entry);
break;
}
diff --git a/src/libudev/libudev-util.c b/src/libudev/libudev-util.c
index 2eb7907063..62b7e56c05 100644
--- a/src/libudev/libudev-util.c
+++ b/src/libudev/libudev-util.c
@@ -83,7 +83,7 @@ uid_t util_lookup_user(struct udev *udev, const char *user)
size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
char *buf = alloca(buflen);
- if (strcmp(user, "root") == 0)
+ if (streq(user, "root"))
return 0;
uid = strtoul(user, &endptr, 10);
if (endptr[0] == '\0')
@@ -108,7 +108,7 @@ gid_t util_lookup_group(struct udev *udev, const char *group)
size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
char *buf = NULL;
- if (strcmp(group, "root") == 0)
+ if (streq(group, "root"))
return 0;
gid = strtoul(group, &endptr, 10);
if (endptr[0] == '\0')
diff --git a/src/libudev/libudev.c b/src/libudev/libudev.c
index d860ebc080..208039a1b2 100644
--- a/src/libudev/libudev.c
+++ b/src/libudev/libudev.c
@@ -191,7 +191,7 @@ _public_ struct udev *udev_new(void)
val++;
}
- if (strcmp(key, "udev_log") == 0) {
+ if (streq(key, "udev_log")) {
udev_set_log_priority(udev, util_log_priority(val));
continue;
}