summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/coredumpctl.c5
-rw-r--r--src/journal/journalctl.c3
2 files changed, 4 insertions, 4 deletions
diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c
index 0fa427003b..0546290318 100644
--- a/src/journal/coredumpctl.c
+++ b/src/journal/coredumpctl.c
@@ -646,8 +646,9 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) {
fdf = open(filename, O_RDONLY | O_CLOEXEC);
if (fdf < 0) {
- log_error_errno(errno, "Failed to open %s: %m", filename);
- r = -errno;
+ r = log_error_errno(errno,
+ "Failed to open %s: %m",
+ filename);
goto error;
}
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index d31ab1c6d7..576e4e4d03 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1453,8 +1453,7 @@ static int setup_keys(void) {
safe_close(fd);
fd = mkostemp_safe(k, O_WRONLY|O_CLOEXEC);
if (fd < 0) {
- log_error_errno(errno, "Failed to open %s: %m", k);
- r = -errno;
+ r = log_error_errno(errno, "Failed to open %s: %m", k);
goto finish;
}