diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-07-20 11:06:37 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-07-20 11:06:37 +0000 |
commit | aff20d822c267f0b2f348f7dfd3946aaf9c06817 (patch) | |
tree | 22c70841a5542c512a92bbb0734618768d8818de /source3/lib | |
parent | 750a1f9e5840054127a759bb64fa731df9152aa6 (diff) | |
download | samba-aff20d822c267f0b2f348f7dfd3946aaf9c06817.tar.gz samba-aff20d822c267f0b2f348f7dfd3946aaf9c06817.tar.bz2 samba-aff20d822c267f0b2f348f7dfd3946aaf9c06817.zip |
Add some const to try and get less warnings.
Andrew Bartlett
(This used to be commit 2a3d821c77c7648de43b11dd951f6f16d7be5b3c)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util_str.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |