From: Christian Brauner Date: Sat, 17 Feb 2018 17:55:15 +0000 (+0100) Subject: cgfsng: get_max_cpus() X-Git-Tag: lxc-2.0.10~308 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b4cd6389ceee7ee301f650d34206a638db79828;p=thirdparty%2Flxc.git cgfsng: get_max_cpus() Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 58749b78a..b1cb79040 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -487,13 +487,9 @@ static ssize_t get_max_cpus(char *cpulist) c2 = c1; else if (c1 < c2) c1 = c2; - else if (!c1 && c2) /* The reverse case is obvs. not needed. */ + else if (!c1 && c2) c1 = c2; - /* If the above logic is correct, c1 should always hold a valid string - * here. - */ - errno = 0; cpus = strtoul(c1, NULL, 0); if (errno != 0)