chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: properly clean up user cgroups when they run empty
[elogind.git]
/
src
/
test
/
test-libudev.c
diff --git
a/src/test/test-libudev.c
b/src/test/test-libudev.c
index f5c7ae2c306b96f552e6509664ddebca69410a32..481ce65dbf57b4e1b4d164695d5795f125340cc9 100644
(file)
--- a/
src/test/test-libudev.c
+++ b/
src/test/test-libudev.c
@@
-21,6
+21,7
@@
#include <sys/epoll.h>
#include "libudev.h"
#include <sys/epoll.h>
#include "libudev.h"
+#include "util.h"
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
@@
-474,7
+475,7
@@
int main(int argc, char *argv[])
}
/* add sys path if needed */
}
/* 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;
}
snprintf(path, sizeof(path), "/sys/%s", syspath);
syspath = path;
}