summaryrefslogtreecommitdiff
path: root/source4/lib/util_unistr.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/util_unistr.c')
-rw-r--r--source4/lib/util_unistr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c
index 1d7d0de19a..2d4b2e8fa8 100644
--- a/source4/lib/util_unistr.c
+++ b/source4/lib/util_unistr.c
@@ -224,10 +224,10 @@ wide strchr()
smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c)
{
while (*s != 0) {
- if (c == *s) return s;
+ if (c == *s) return discard_const_p(smb_ucs2_t, s);
s++;
}
- if (c == *s) return s;
+ if (c == *s) return discard_const_p(smb_ucs2_t, s);
return NULL;
}
@@ -244,7 +244,7 @@ smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c)
if (len == 0) return NULL;
p += (len - 1);
do {
- if (c == *p) return p;
+ if (c == *p) return discard_const_p(smb_ucs2_t, p);
} while (p-- != s);
return NULL;
}