strv: make iterator in STRV_FOREACH() declaread in the loop
This also avoids multiple evaluations in STRV_FOREACH_BACKWARDS()
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
static int cg_any_controller_used_for_v1(void) {
|
||||
_cleanup_free_ char *buf = NULL;
|
||||
_cleanup_strv_free_ char **lines = NULL;
|
||||
char **line;
|
||||
int r;
|
||||
|
||||
r = read_full_virtual_file("/proc/cgroups", &buf, NULL);
|
||||
|
||||
Reference in New Issue
Block a user