return new;
}
-/*
- * Get a copy of the mountpoint from @line, which is a line from
- * /proc/self/mountinfo
+/* Get a copy of the mountpoint from @line, which is a line from
+ * /proc/self/mountinfo.
*/
static char *cg_hybrid_get_mountpoint(char *line)
{
int i;
- char *p2;
size_t len;
- char *p = line;
- char *sret = NULL;
+ char *p2;
+ char *p = line, *sret = NULL;
for (i = 0; i < 4; i++) {
p = strchr(p, ' ');
p++;
}
- if (strncmp(p, "/sys/fs/cgroup/", 15))
+ if (strncmp(p, "/sys/fs/cgroup/", 15) != 0)
return NULL;
p2 = strchr(p + 15, ' ');