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:
parent
d6c5d19b66
commit
2e38df5349
@ -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) {
|
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 CatalogHeader *h = p;
|
||||||
const char *loc;
|
const char *loc;
|
||||||
|
|
||||||
zero(key);
|
|
||||||
key.id = id;
|
|
||||||
|
|
||||||
loc = setlocale(LC_MESSAGES, NULL);
|
loc = setlocale(LC_MESSAGES, NULL);
|
||||||
if (loc && loc[0] && !streq(loc, "C") && !streq(loc, "POSIX")) {
|
if (loc && loc[0] && !streq(loc, "C") && !streq(loc, "POSIX")) {
|
||||||
strncpy(key.language, loc, sizeof(key.language));
|
strncpy(key.language, loc, sizeof(key.language));
|
||||||
|
Loading…
Reference in New Issue
Block a user