diff options
author | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 18:23:20 +0100 |
---|---|---|
committer | Michal Schmidt <mschmidt@redhat.com> | 2014-11-28 18:24:30 +0100 |
commit | 23bbb0de4e3f85d9704a5c12a5afa2dfa0159e41 (patch) | |
tree | 28e66fb86dd0cffc3a3cca3cf234cb52c3b64ad3 /src/journal/coredump.c | |
parent | 5e03c6e3b517286bbd65b48d88f60e5b83721894 (diff) |
treewide: more log_*_errno + return simplifications
Diffstat (limited to 'src/journal/coredump.c')
-rw-r--r-- | src/journal/coredump.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/journal/coredump.c b/src/journal/coredump.c index 32fa7be0aa..c22d0b0471 100644 --- a/src/journal/coredump.c +++ b/src/journal/coredump.c @@ -312,10 +312,8 @@ static int save_external_coredump( assert(ret_size); r = make_filename(info, &fn); - if (r < 0) { - log_error_errno(r, "Failed to determine coredump file name: %m"); - return r; - } + if (r < 0) + return log_error_errno(r, "Failed to determine coredump file name: %m"); tmp = tempfn_random(fn); if (!tmp) @@ -445,10 +443,8 @@ static int allocate_journal_field(int fd, size_t size, char **ret, size_t *ret_s memcpy(field, "COREDUMP=", 9); n = read(fd, field + 9, size); - if (n < 0) { - log_error_errno(n, "Failed to read core data: %m"); - return (int) n; - } + if (n < 0) + return log_error_errno((int) n, "Failed to read core data: %m"); if ((size_t) n < size) { log_error("Core data too short."); return -EIO; |