treewide: apply errno.cocci

with small manual cleanups for style.
This commit is contained in:
Michal Schmidt
2015-11-09 20:01:06 +01:00
parent b3e3bb19a0
commit e1427b138f
21 changed files with 43 additions and 87 deletions
+2 -4
View File
@@ -554,8 +554,7 @@ static int process_root_password(void) {
if (!errno)
errno = EIO;
log_error_errno(errno, "Failed to find shadow entry for root: %m");
return -errno;
return log_error_errno(errno, "Failed to find shadow entry for root: %m");
}
r = write_root_shadow(etc_shadow, p);
@@ -592,8 +591,7 @@ static int process_root_password(void) {
if (!errno)
errno = EINVAL;
log_error_errno(errno, "Failed to encrypt password: %m");
return -errno;
return log_error_errno(errno, "Failed to encrypt password: %m");
}
item.sp_lstchg = (long) (now(CLOCK_REALTIME) / USEC_PER_DAY);