Commit 449710f8 by Serge Hallyn

cgmanager: fix abuse of 'i'

we were initializing i to 0, then doing a while i <, but then a separate commit (by myself) used i as a generic variable in between those two. Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
parent 3b117b85
...@@ -1286,7 +1286,7 @@ static bool verify_final_subsystems(const char *cgroup_use) ...@@ -1286,7 +1286,7 @@ static bool verify_final_subsystems(const char *cgroup_use)
{ {
int i = 0; int i = 0;
bool dropped_any = false; bool dropped_any = false;
bool ret = false; bool bret = false;
const char *cgroup_pattern; const char *cgroup_pattern;
char tmpnam[50], *probe; char tmpnam[50], *probe;
...@@ -1305,7 +1305,7 @@ static bool verify_final_subsystems(const char *cgroup_use) ...@@ -1305,7 +1305,7 @@ static bool verify_final_subsystems(const char *cgroup_use)
if (!probe) if (!probe)
goto out; goto out;
while (i < nr_subsystems) { for (i = 0; i < nr_subsystems; i++) {
char *p = get_last_controller_in_list(subsystems[i]); char *p = get_last_controller_in_list(subsystems[i]);
if (!subsys_is_writeable(p, probe)) { if (!subsys_is_writeable(p, probe)) {
...@@ -1331,12 +1331,12 @@ static bool verify_final_subsystems(const char *cgroup_use) ...@@ -1331,12 +1331,12 @@ static bool verify_final_subsystems(const char *cgroup_use)
if (dropped_any) if (dropped_any)
cgm_all_controllers_same = false; cgm_all_controllers_same = false;
ret = true; bret = true;
out: out:
free(probe); free(probe);
cgm_dbus_disconnect(); cgm_dbus_disconnect();
return ret; return bret;
} }
static bool collect_subsytems(void) static bool collect_subsytems(void)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment