diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-04-25 00:26:41 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-04-25 12:00:03 +0200 |
commit | cb306f5d500b6cf8e4367a847aa96ff764ad3aff (patch) | |
tree | 02f2ea64aa6515b5bc2583a76590689b1f0adc31 /src/journal/sd-journal.c | |
parent | 0f7488722d9ef97cb5d036575f4c312a00bb702f (diff) | |
download | systemd-cb306f5d500b6cf8e4367a847aa96ff764ad3aff.tar.gz |
sd-journal: minor simplification
Diffstat (limited to 'src/journal/sd-journal.c')
-rw-r--r-- | src/journal/sd-journal.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 44bf8ab511..5104bc3e01 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -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) { |