summaryrefslogtreecommitdiff
path: root/userland/libc/string/strstr.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2023-11-23 00:52:35 +0100
committerAnton Kling <anton@kling.gg>2023-11-23 00:52:35 +0100
commit81819f711e6d1f9216f688da8ecbbc682d106d9c (patch)
tree0f0df7c43cc5bc956c2c067e55766bfa90823a7f /userland/libc/string/strstr.c
parentec91e81a4fcfd7ee6bc4150f06d8740e82f808da (diff)
LibC: Reduce warnings in code
Diffstat (limited to 'userland/libc/string/strstr.c')
-rw-r--r--userland/libc/string/strstr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/userland/libc/string/strstr.c b/userland/libc/string/strstr.c
index 20b9dc2..9de0954 100644
--- a/userland/libc/string/strstr.c
+++ b/userland/libc/string/strstr.c
@@ -3,7 +3,7 @@
char *strstr(const char *s1, const char *s2) {
// If s2 points to a string with zero length, the function shall return s1.
if ('\0' == *s2)
- return s1;
+ return (char*)s1;
for (; *s1; s1++) {
const char *t1 = s1;
const char *t2 = s2;
@@ -15,7 +15,7 @@ char *strstr(const char *s1, const char *s2) {
}
}
if (!is_dif)
- return s1;
+ return (char*)s1;
}
return NULL;
}