diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 17:34:26 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 17:34:26 +0100 |
commit | eb56eb9b40950f1edcffdb7313f8de4f8572a6d5 (patch) | |
tree | 6e6c04129d1bb12b5ff3fcfbc26a294766079e0e /src/journal/catalog.c | |
parent | treewide: more log_*_errno() conversions, multiline calls (diff) | |
download | systemd-eb56eb9b40950f1edcffdb7313f8de4f8572a6d5.tar.xz systemd-eb56eb9b40950f1edcffdb7313f8de4f8572a6d5.zip |
treewide: simplify log_*_errno(r,...) immediately followed by "return r"
Diffstat (limited to 'src/journal/catalog.c')
-rw-r--r-- | src/journal/catalog.c | 14 |
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)); |