]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/string/strspn/: Add missing const
authorAlejandro Colomar <alx@kernel.org>
Wed, 19 Feb 2025 17:52:45 +0000 (18:52 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 5 Dec 2025 02:35:51 +0000 (20:35 -0600)
Closes: <https://github.com/shadow-maint/shadow/issues/1218>
Reported-by: Chris Hofstaedtler <zeha@debian.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
lib/string/strspn/strrcspn.h
lib/string/strspn/strrspn.h

index d3c02e5edb8f505a089e442665a1fc06da0cb2ef..6855ad33e183b3f5ca8abcad3989281eca034d8c 100644 (file)
@@ -24,7 +24,7 @@ inline size_t strrcspn(const char *s, const char *reject);
 inline size_t
 strrcspn(const char *s, const char *reject)
 {
-       char  *p;
+       const char  *p;
 
        p = strnul(s);
        while (p > s) {
index f61094f829c646831bd5b7b86468ec842759dbe6..b5ffdc37ecf51a96870ffad94b8446491b6d4f42 100644 (file)
@@ -24,7 +24,7 @@ inline size_t strrspn_(const char *s, const char *accept);
 inline size_t
 strrspn_(const char *s, const char *accept)
 {
-       char  *p;
+       const char  *p;
 
        p = strnul(s);
        while (p > s) {