From: Christian Brauner Date: Sat, 17 Feb 2018 17:55:15 +0000 (+0100) Subject: cgfsng: get_max_cpus() X-Git-Tag: lxc-3.0.0.beta1~22^2~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=333987b9e590617cd05ae3aeb893546ba3e55911;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 9ca42e50b..689661f7c 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -496,13 +496,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)