summaryrefslogtreecommitdiff
path: root/src/firstboot
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2015-11-05 13:44:20 +0100
committerMichal Schmidt <mschmidt@redhat.com>2015-11-09 20:01:06 +0100
commite1427b138fbf7b7f13bb61187635b882be3ca2b2 (patch)
treeb3ce451e25222b085aee42f70bcd8ae46386642b /src/firstboot
parentb3e3bb19a06795ee1eb3679a839f4687ba99143f (diff)
treewide: apply errno.cocci
with small manual cleanups for style.
Diffstat (limited to 'src/firstboot')
-rw-r--r--src/firstboot/firstboot.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c
index 96be4ebcc6..642d36912c 100644
--- a/src/firstboot/firstboot.c
+++ b/src/firstboot/firstboot.c
@@ -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);