tmpfiles: why memset() and memcpy() if we have '=' and structured initialization?

This commit is contained in:
Lennart Poettering 2018-10-25 13:53:07 +02:00
parent 96d10d7837
commit 7ab7529d45
1 changed files with 2 additions and 2 deletions

View File

@ -2801,12 +2801,12 @@ static int parse_line(const char *fname, unsigned line, const char *buffer, bool
if (!GREEDY_REALLOC(existing->items, existing->allocated, existing->n_items + 1))
return log_oom();
memcpy(existing->items + existing->n_items++, &i, sizeof(i));
existing->items[existing->n_items++] = i;
i = (struct Item) {};
/* Sort item array, to enforce stable ordering of application */
typesafe_qsort(existing->items, existing->n_items, item_compare);
zero(i);
return 0;
}