From 48c97988ca6703264721c6be435e6f616cdbdcb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 25 Sep 2004 12:31:49 +0000 Subject: r2631: the strchr family of functions should not return const strings. (This used to be commit 2a7e5f07086ef4aebbb2be35acbf9c7c39b13c75) --- source4/lib/util_unistr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source4/lib/util_unistr.c b/source4/lib/util_unistr.c index a05df0983b..1d7d0de19a 100644 --- a/source4/lib/util_unistr.c +++ b/source4/lib/util_unistr.c @@ -221,7 +221,7 @@ size_t strnlen_w(const smb_ucs2_t *src, size_t max) /******************************************************************* wide strchr() ********************************************************************/ -const smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c) +smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c) { while (*s != 0) { if (c == *s) return s; @@ -232,12 +232,12 @@ const smb_ucs2_t *strchr_w(const smb_ucs2_t *s, smb_ucs2_t c) return NULL; } -const smb_ucs2_t *strchr_wa(const smb_ucs2_t *s, char c) +smb_ucs2_t *strchr_wa(const smb_ucs2_t *s, char c) { return strchr_w(s, UCS2_CHAR(c)); } -const smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c) +smb_ucs2_t *strrchr_w(const smb_ucs2_t *s, smb_ucs2_t c) { const smb_ucs2_t *p = s; int len = strlen_w(s); -- cgit