summaryrefslogtreecommitdiff
path: root/src/journal/catalog.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/catalog.c')
-rw-r--r--src/journal/catalog.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/journal/catalog.c b/src/journal/catalog.c
index 67bf4ba017..03dddb48a5 100644
--- a/src/journal/catalog.c
+++ b/src/journal/catalog.c
@@ -341,17 +341,13 @@ static long write_catalog(const char *database, Hashmap *h, struct strbuf *sb,
return log_oom();
r = mkdir_p(d, 0775);
- if (r < 0) {
- log_error_errno(r, "Recursive mkdir %s: %m", d);
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Recursive mkdir %s: %m", d);
r = fopen_temporary(database, &w, &p);
- if (r < 0) {
- log_error_errno(r, "Failed to open database for writing: %s: %m",
- database);
- return r;
- }
+ if (r < 0)
+ return log_error_errno(r, "Failed to open database for writing: %s: %m",
+ database);
zero(header);
memcpy(header.signature, CATALOG_SIGNATURE, sizeof(header.signature));