From b8ed8b124aaff754e244dff6930b36c192fa69e0 Mon Sep 17 00:00:00 2001 From: "Anthony G. Basile" Date: Tue, 14 Jan 2014 12:20:25 -0500 Subject: src/libudev: bring in line with upstream Signed-off-by: Anthony G. Basile --- src/libudev/strv.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/libudev/strv.c') 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; -- cgit v1.2.3-54-g00ecf