chiark / gitweb /
use strneq instead of strncmp
[elogind.git] / src / shared / cgroup-util.c
index acace52bc8daaa7ab2299e85f2108fec27e63762..7efbc2ed39349f601f4f387db8a00f71f559f11c 100644 (file)
@@ -811,7 +811,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] != ':')