chiark / gitweb /
strv: fix STRV_FOREACH_PAIR macro definition
[elogind.git] / src / shared / cgroup-util.c
index acace52bc8daaa7ab2299e85f2108fec27e63762..be00b40fa2346afb2ebf43ab6847d4d61a025f6f 100644 (file)
@@ -37,6 +37,7 @@
 #include "path-util.h"
 #include "strv.h"
 #include "unit-name.h"
+#include "fileio.h"
 
 int cg_enumerate_processes(const char *controller, const char *path, FILE **_f) {
         char *fs;
@@ -811,7 +812,7 @@ int cg_get_by_pid(const char *controller, pid_t pid, char **path) {
                         continue;
 
                 l++;
-                if (strncmp(l, controller, cs) != 0)
+                if (!strneq(l, controller, cs))
                         continue;
 
                 if (l[cs] != ':')