summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/linux/string.h2
-rw-r--r--lib/string.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/string.h b/include/linux/string.h
index 850356d7c3f..488a459ed99 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -63,7 +63,7 @@ extern char * strchr(const char *,int);
* @c: character to search for
* Return: position of @c in @s, or end of @s if not found
*/
-const char *strchrnul(const char *s, int c);
+char *strchrnul(const char *s, int c);
#ifndef __HAVE_ARCH_STRRCHR
extern char * strrchr(const char *,int);
diff --git a/lib/string.c b/lib/string.c
index 37ea8c29561..a76dcd48d20 100644
--- a/lib/string.c
+++ b/lib/string.c
@@ -263,12 +263,12 @@ char * strchr(const char * s, int c)
}
#endif
-const char *strchrnul(const char *s, int c)
+char *strchrnul(const char *s, int c)
{
for (; *s != (char)c; ++s)
if (*s == '\0')
break;
- return s;
+ return (char *)s;
}
#ifndef __HAVE_ARCH_STRRCHR