projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f74887
)
sd-journal: minor simplification
author
Lennart Poettering
<lennart@poettering.net>
Sun, 24 Apr 2016 22:26:41 +0000
(
00:26
+0200)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 25 Apr 2016 10:00:03 +0000
(12:00 +0200)
src/journal/sd-journal.c
patch
|
blob
|
history
diff --git
a/src/journal/sd-journal.c
b/src/journal/sd-journal.c
index
44bf8ab
..
5104bc3
100644
(file)
--- 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) {