]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/usermod.c: Fix const correctness
authorAlejandro Colomar <alx@kernel.org>
Sun, 5 May 2024 22:25:41 +0000 (00:25 +0200)
committerAlejandro Colomar <alx@kernel.org>
Sat, 29 Jun 2024 18:00:18 +0000 (20:00 +0200)
Now that we use liba2i's const-generic macros, we can (and must) use a
'const char **' endp where the input string is 'const char *'.

Reviewed-by: "Serge E. Hallyn" <serge@hallyn.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/usermod.c

index 4e03afbb60846d4f7d9dfca362532db96dc1fb76..52d9dbb72ef3f9cfc56b7f8b7cbf4a09db5c4d92 100644 (file)
@@ -304,7 +304,7 @@ struct ulong_range
 
 static struct ulong_range getulong_range(const char *str)
 {
-       char                *pos;
+       const char          *pos;
        unsigned long       first, last;
        struct ulong_range  result = { .first = ULONG_MAX, .last = 0 };