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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user