diff --git a/src/sysext/sysext.c b/src/sysext/sysext.c index ce2468fafd..a617bd0f76 100644 --- a/src/sysext/sysext.c +++ b/src/sysext/sysext.c @@ -1395,7 +1395,7 @@ static int store_info_in_meta( /* Make sure the top-level dir has an mtime marking the point we established the merge */ if (utimensat(AT_FDCWD, meta_path, NULL, AT_SYMLINK_NOFOLLOW) < 0) - return log_error_errno(r, "Failed to fix mtime of '%s': %m", meta_path); + return log_error_errno(errno, "Failed to fix mtime of '%s': %m", meta_path); return 0; } diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index c22dbbeda0..48d256b15c 100644 --- a/src/sysusers/sysusers.c +++ b/src/sysusers/sysusers.c @@ -352,7 +352,7 @@ static int make_backup(const char *target, const char *x) { return r; if (rename(dst_tmp, backup) < 0) - return errno; + return -errno; dst_tmp = mfree(dst_tmp); /* disable the unlink_and_freep() hook now that the file has been renamed */ return 0;