From edae86e922420b11a55932eb446b4cbeed48c9f1 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 20 Oct 2018 11:13:59 +0200 Subject: [PATCH] cgfsng: move increment out of branch Signed-off-by: Christian Brauner --- src/lxc/cgroups/cgfsng.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 1a722ae2f..43403ce42 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2133,7 +2133,8 @@ static int __cg_unified_attach(const struct hierarchy *h, const char *name, if (errno != EBUSY) goto on_error; - } while (++idx > 0 && idx < 1000); + idx++; + } while (idx < 1000); on_success: if (idx < 1000) -- 2.47.2