basic: shorten the code a bit in two places

gcc complains that len might be used unitialized, but afaict, this is not true.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2018-02-26 15:47:12 +01:00
parent f2e3f36950
commit 00d4b1e684
2 changed files with 8 additions and 18 deletions
+1 -3
View File
@@ -1062,13 +1062,11 @@ int cg_pid_get_path(const char *controller, pid_t pid, char **path) {
continue;
*e = 0;
FOREACH_WORD_SEPARATOR(word, k, l, ",", state) {
FOREACH_WORD_SEPARATOR(word, k, l, ",", state)
if (k == cs && memcmp(word, controller_str, cs) == 0) {
found = true;
break;
}
}
if (!found)
continue;
}