if (strequal(p + 1, "/")) {
/* This is '/'. Is it the ramfs? */
p = strchr(p2 + 1, '-');
- if (p && strncmp(p, "- rootfs ", 9) == 0)
+ if (p && strnequal(p, "- rootfs ", 9))
return true;
}
}
if (subdirlen < len)
return false;
- if (strncmp(subdir, dir, len) != 0)
+ if (!strnequal(subdir, dir, len))
return false;
if (dir[len-1] == '/')
while (getline(&line, &n, f) != -1) {
char *numstr;
- if (strncmp(line, "SigBlk:", 7))
+ if (!strnequal(line, "SigBlk:", 7))
continue;
numstr = lxc_trim_whitespace_in_place(line + 7);
}
while ((dp = readdir(dir))) {
- if (strncmp(dp->d_name, "loop", 4) != 0)
+ if (!strnequal(dp->d_name, "loop", 4))
continue;
dfd = dirfd(dir);
while (getline(&line, &n, f) != -1) {
char *state;
- if (strncmp(line, "State:", 6))
+ if (!strnequal(line, "State:", 6))
continue;
state = lxc_trim_whitespace_in_place(line + 6);