1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 01:27:11 +03:00

journal: use structured initalizer

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2018-03-25 22:44:05 +02:00
parent d6c5d19b66
commit 2e38df5349

View File

@ -592,13 +592,10 @@ static int open_mmap(const char *database, int *_fd, struct stat *_st, void **_p
}
static const char *find_id(void *p, sd_id128_t id) {
CatalogItem key, *f = NULL;
CatalogItem *f = NULL, key = { .id = id };
const CatalogHeader *h = p;
const char *loc;
zero(key);
key.id = id;
loc = setlocale(LC_MESSAGES, NULL);
if (loc && loc[0] && !streq(loc, "C") && !streq(loc, "POSIX")) {
strncpy(key.language, loc, sizeof(key.language));