summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-04-29 09:11:07 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:05:11 -0500
commitb4246a73537258bedbec63e37cb120a7d7ebafa8 (patch)
tree9f97ec7015d10b5dcbd239de83f833dc099d3c74 /source4
parented173c969303cd651ae8d83064fac893b90d596e (diff)
downloadsamba-b4246a73537258bedbec63e37cb120a7d7ebafa8.tar.gz
samba-b4246a73537258bedbec63e37cb120a7d7ebafa8.tar.bz2
samba-b4246a73537258bedbec63e37cb120a7d7ebafa8.zip
r15316: I don't understand quite why this function was ever like this, but we
need to replace every instance of the character. Previously we skipped the first. Andrew Bartlett (This used to be commit 5b58ab98d6b47b7cfd47eb5f7d38dc3724e44ca2)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/util/util_str.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/lib/util/util_str.c b/source4/lib/util/util_str.c
index 34d37ecfbd..df9fd44cd6 100644
--- a/source4/lib/util/util_str.c
+++ b/source4/lib/util/util_str.c
@@ -775,8 +775,7 @@ _PUBLIC_ int strwicmp(const char *psz1, const char *psz2)
**/
_PUBLIC_ void string_replace(char *s, char oldc, char newc)
{
- while (*s) {
- s++;
+ for (;s && *s; s++) {
if (*s == oldc) *s = newc;
}
}