summaryrefslogtreecommitdiff
path: root/src/libudev/libudev-util.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-util.c
parentb05105f0a80bcf2f2d18e9e33f740d7d04fca633 (diff)
use streq instead of strcmp
Diffstat (limited to 'src/libudev/libudev-util.c')
-rw-r--r--src/libudev/libudev-util.c4
1 files changed, 2 insertions, 2 deletions
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')