1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

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 5b58ab98d6)
This commit is contained in:
Andrew Bartlett 2006-04-29 09:11:07 +00:00 committed by Gerald (Jerry) Carter
parent ed173c9693
commit b4246a7353

View File

@ -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;
}
}