summaryrefslogtreecommitdiff
path: root/src/libudev/strv.c
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2014-01-14 12:20:25 -0500
committerAnthony G. Basile <blueness@gentoo.org>2014-01-14 12:20:25 -0500
commitb8ed8b124aaff754e244dff6930b36c192fa69e0 (patch)
treec6d7caf75d42584eaf0227332d6c43ecc76d7565 /src/libudev/strv.c
parentfd98dfdcb889c74c84a00e54e8094f9c91387c6a (diff)
src/libudev: bring in line with upstream
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/strv.c')
-rw-r--r--src/libudev/strv.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/libudev/strv.c b/src/libudev/strv.c
index 3619701e9d..cbfe2388d6 100644
--- a/src/libudev/strv.c
+++ b/src/libudev/strv.c
@@ -202,15 +202,11 @@ char **strv_remove(char **l, const char *s) {
/* Drops every occurrence of s in the string list, edits
* in-place. */
- for (f = t = l; *f; f++) {
-
- if (streq(*f, s)) {
+ for (f = t = l; *f; f++)
+ if (streq(*f, s))
free(*f);
- continue;
- }
-
- *(t++) = *f;
- }
+ else
+ *(t++) = *f;
*t = NULL;
return l;