summaryrefslogtreecommitdiff
path: root/src/test/test-libudev.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-16 20:27:44 +0200
committerKay Sievers <kay@vrfy.org>2012-04-16 20:54:17 +0200
commit33502ffe2eb7b56cdd018a4fb6830d7828519fad (patch)
tree02180c0a82618b09f7346edaa7b28dd93eb81c9f /src/test/test-libudev.c
parent6ada823a9a0979ea145fd70add1007c21caa45c0 (diff)
udev: use startswith() and streq()
Diffstat (limited to 'src/test/test-libudev.c')
-rw-r--r--src/test/test-libudev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c
index f5c7ae2c30..481ce65dbf 100644
--- a/src/test/test-libudev.c
+++ b/src/test/test-libudev.c
@@ -21,6 +21,7 @@
#include <sys/epoll.h>
#include "libudev.h"
+#include "util.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@ -474,7 +475,7 @@ int main(int argc, char *argv[])
}
/* add sys path if needed */
- if (strncmp(syspath, "/sys", strlen("/sys")) != 0) {
+ if (!startswith(syspath, "/sys")) {
snprintf(path, sizeof(path), "/sys/%s", syspath);
syspath = path;
}