treewide: apply errno.cocci
with small manual cleanups for style.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user