tmpfiles: Fix handling of duplicate lines

Commit 3f93da987 accidentally dropped the "return 0" after detection of a
duplicate line. Put it back, to get back the documented and intended "first
match wins" behaviour.

https://launchpad.net/bugs/1428540
This commit is contained in:
Martin Pitt 2015-03-05 14:58:56 +01:00
parent 6437edbebe
commit 6487ada88d

View file

@ -1746,9 +1746,11 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) {
unsigned n; unsigned n;
for (n = 0; n < existing->count; n++) { for (n = 0; n < existing->count; n++) {
if (!item_compatible(existing->items + n, &i)) if (!item_compatible(existing->items + n, &i)) {
log_warning("[%s:%u] Duplicate line for path \"%s\", ignoring.", log_warning("[%s:%u] Duplicate line for path \"%s\", ignoring.",
fname, line, i.path); fname, line, i.path);
return 0;
}
} }
} else { } else {
existing = new0(ItemArray, 1); existing = new0(ItemArray, 1);