git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
658fb2b
)
r15316: I don't understand quite why this function was ever like this, but we
author
Andrew Bartlett
<abartlet@samba.org>
Sat, 29 Apr 2006 09:11:07 +0000
(09:11 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 19:05:11 +0000
(14:05 -0500)
need to replace every instance of the character. Previously we
skipped the first.
Andrew Bartlett
source/lib/util/util_str.c
patch
|
blob
|
history
diff --git
a/source/lib/util/util_str.c
b/source/lib/util/util_str.c
index 34d37ecfbdd7cf69e7cd0f90c243abb245230a0e..df9fd44cd6ba28eee8457e0d477bde86e65c1e80 100644
(file)
--- a/
source/lib/util/util_str.c
+++ b/
source/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;
}
}