cgfsng: coding style for cgfsng_monitor_create()

parent f57860ac
...@@ -1329,7 +1329,7 @@ static void remove_path_for_hierarchy(struct hierarchy *h, char *cgname, bool mo ...@@ -1329,7 +1329,7 @@ static void remove_path_for_hierarchy(struct hierarchy *h, char *cgname, bool mo
} }
__cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops, __cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops,
struct lxc_handler *handler) struct lxc_handler *handler)
{ {
__do_free char *monitor_cgroup = NULL; __do_free char *monitor_cgroup = NULL;
char *offset, *tmp; char *offset, *tmp;
...@@ -1367,10 +1367,14 @@ __cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops, ...@@ -1367,10 +1367,14 @@ __cgfsng_ops static inline bool cgfsng_monitor_create(struct cgroup_ops *ops,
} }
for (i = 0; ops->hierarchies[i]; i++) { for (i = 0; ops->hierarchies[i]; i++) {
if (!monitor_create_path_for_hierarchy(ops->hierarchies[i], monitor_cgroup)) { if (!monitor_create_path_for_hierarchy(ops->hierarchies[i],
ERROR("Failed to create cgroup \"%s\"", ops->hierarchies[i]->monitor_full_path); monitor_cgroup)) {
ERROR("Failed to create cgroup \"%s\"",
ops->hierarchies[i]->monitor_full_path);
for (int j = 0; j < i; j++) for (int j = 0; j < i; j++)
remove_path_for_hierarchy(ops->hierarchies[j], monitor_cgroup, true); remove_path_for_hierarchy(ops->hierarchies[j],
monitor_cgroup,
true);
idx++; idx++;
break; break;
......
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