]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/getrange.c: getrange(): Add missing cast
authorAlejandro Colomar <alx@kernel.org>
Sat, 6 Jan 2024 23:31:01 +0000 (00:31 +0100)
committerIker Pedrosa <ikerpedrosam@gmail.com>
Fri, 17 May 2024 13:40:03 +0000 (15:40 +0200)
isdigit(3) requires a cast if the argument is of type 'char'.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/getrange.c

index 86f77711effb5ae1aa01a1ae85188c01149fc5d4..16022df32a0de5176acb9e32569a1f1cdeb68f53 100644 (file)
@@ -55,7 +55,7 @@ getrange(const char *range,
                if ('\0' == *end)
                        return 0;  /* <long>- */
 parse_max:
-               if (!isdigit(*end))
+               if (!isdigit((unsigned char) *end))
                        return -1;
 
                if (a2ul(max, end, NULL, 10, 0, ULONG_MAX) == -1)