summaryrefslogtreecommitdiff
path: root/source4/lib/util_unistr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-25 12:48:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:14 -0500
commit6310f40448f9f9e856874cbefcc25b753963a41e (patch)
treee4ce63697114f23b9cd93ad8d925e03e736ac7d9 /source4/lib/util_unistr.c
parent18104c5679331c763f513f4c01b67b68f7a746fd (diff)
downloadsamba-6310f40448f9f9e856874cbefcc25b753963a41e.tar.gz
samba-6310f40448f9f9e856874cbefcc25b753963a41e.tar.bz2
samba-6310f40448f9f9e856874cbefcc25b753963a41e.zip
r2634: use discard_const_p() in a few places
(This used to be commit 56ecda2178e33508c55c6195ccec41c06e099d6f)
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;
}