]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgfsng: get_max_cpus()
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 17 Feb 2018 17:55:15 +0000 (18:55 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 21 Feb 2018 14:48:16 +0000 (15:48 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c

index 58749b78aa8633f914eb2adabae7bf9cf196d144..b1cb79040c90d52e8f8df36a8e7d9f62b4417645 100644 (file)
@@ -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)