chiark / gitweb /
test: allow deletion of temporary files from normal fs
[elogind.git] / src / test / test-libudev.c
index f5c7ae2c306b96f552e6509664ddebca69410a32..481ce65dbf57b4e1b4d164695d5795f125340cc9 100644 (file)
@@ -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;
         }