]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/cpuset: make max variable const
authorThomas Weißschuh <thomas@t-8ch.de>
Thu, 1 Feb 2024 19:09:17 +0000 (20:09 +0100)
committerThomas Weißschuh <thomas@t-8ch.de>
Thu, 1 Feb 2024 19:09:17 +0000 (20:09 +0100)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
lib/cpuset.c

index 098b8e5ae5a5c4c0d549ebbab5437df8e5a7a470..643537f6d9f1bc40f2800e1e017aa0ec88ab65c4 100644 (file)
@@ -287,7 +287,7 @@ static int nextnumber(const char *str, char **end, unsigned int *result)
  */
 int cpulist_parse(const char *str, cpu_set_t *set, size_t setsize, int fail)
 {
-       size_t max = cpuset_nbits(setsize);
+       const size_t max = cpuset_nbits(setsize);
        const char *p, *q;
        char *end = NULL;