Unverified Commit 51db0046 by Christian Brauner Committed by GitHub

Merge pull request #2804 from Rachid-Koucha/patch-4

Avoid hardcoded string length
parents 60014557 db1228b3
......@@ -52,10 +52,11 @@ static int do_freeze_thaw(bool freeze, struct lxc_conf *conf, const char *name,
char v[100];
struct cgroup_ops *cgroup_ops;
const char *state;
size_t state_len = 6;
size_t state_len;
lxc_state_t new_state = freeze ? FROZEN : THAWED;
state = lxc_state2str(new_state);
state_len = strlen(state);
cgroup_ops = cgroup_init(conf);
if (!cgroup_ops)
......
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