From aff20d822c267f0b2f348f7dfd3946aaf9c06817 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 20 Jul 2002 11:06:37 +0000 Subject: Add some const to try and get less warnings. Andrew Bartlett (This used to be commit 2a3d821c77c7648de43b11dd951f6f16d7be5b3c) --- source3/lib/util_str.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/lib/util_str.c') diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 1a2c2bef1f..7e974269ec 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -826,7 +826,8 @@ return a new allocate unicode string. smb_ucs2_t *all_string_sub_w(const smb_ucs2_t *s, const smb_ucs2_t *pattern, const smb_ucs2_t *insert) { - smb_ucs2_t *r, *rp, *sp; + smb_ucs2_t *r, *rp; + const smb_ucs2_t *sp; size_t lr, lp, li, lt; if (!insert || !pattern || !*pattern || !s) return NULL; @@ -836,7 +837,7 @@ smb_ucs2_t *all_string_sub_w(const smb_ucs2_t *s, const smb_ucs2_t *pattern, li = (size_t)strlen_w(insert); if (li > lp) { - smb_ucs2_t *st = s; + const smb_ucs2_t *st = s; int ld = li - lp; while ((sp = strstr_w(st, pattern))) { st = sp + lp; -- cgit