mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
sd-journal: minor simplification
This commit is contained in:
parent
0f7488722d
commit
cb306f5d50
@ -1614,13 +1614,7 @@ static int allocate_inotify(sd_journal *j) {
|
||||
return -errno;
|
||||
}
|
||||
|
||||
if (!j->directories_by_wd) {
|
||||
j->directories_by_wd = hashmap_new(NULL);
|
||||
if (!j->directories_by_wd)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return hashmap_ensure_allocated(&j->directories_by_wd, NULL);
|
||||
}
|
||||
|
||||
static sd_journal *journal_new(int flags, const char *path) {
|
||||
|
Loading…
Reference in New Issue
Block a user