* str: missing const
authorUrban Wallasch <urban.wallasch@freenet.de>
Mon, 28 Oct 2019 20:44:15 +0000 (21:44 +0100)
committerUrban Wallasch <urban.wallasch@freenet.de>
Mon, 28 Oct 2019 20:44:15 +0000 (21:44 +0100)
str/str.h

index 382a9b1857c55f463fea4bffacf51bf081c9c895..a9ad4fa9eeed55bd89975258ecc4542499732a5d 100644 (file)
--- a/str/str.h
+++ b/str/str.h
@@ -404,7 +404,7 @@ static inline char *str_tolower(char *s) {
  * or maxlen if there is no null byte ('\0') among the first maxlen
  * characters in string s.
  */
-static inline size_t str_nlen(char *s, size_t maxlen) {
+static inline size_t str_nlen(const char *s, size_t maxlen) {
     size_t n;
     for (n = 0; n < maxlen && s[n]; ++n)
         ;