commit | bf8cf1483f6784f06fd28b084253f3fc5406e24c | [log] [tgz] |
---|---|---|
author | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | Sat Dec 10 19:45:37 2011 -0200 |
committer | Gustavo Sverzut Barbieri <barbieri@profusion.mobi> | Sun Dec 11 20:58:21 2011 -0200 |
tree | fe620ee3d0a397c954e7943e15dd63c8e7553656 | |
parent | 54ba8b341657f7b3981bc443899e4386ba34d802 [diff] [blame] |
fix string replace. configure files with this would fail: options wl x=1 were being handled as " =1".
diff --git a/libkmod/libkmod-util.c b/libkmod/libkmod-util.c index 2e58c91..9a68a3e 100644 --- a/libkmod/libkmod-util.c +++ b/libkmod/libkmod-util.c
@@ -208,10 +208,9 @@ char *strchr_replace(char *s, int c, char r) { char *p; - - for (p = s; p != NULL; p = strchr(p, c)) - *p = r; - + for (p = s; *p != '\0'; p++) + if (*p == c) + *p = r; return s; }