summaryrefslogtreecommitdiff
path: root/src/update-utmp
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-11-20 02:35:24 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2020-11-20 02:58:27 +0900
commitfed66db05d54146a91cea64f20178d9db05cbdc7 (patch)
tree12559ff4c6bc6f36d7041e348037c0525b9e696b /src/update-utmp
parenta61c0bdf3915495436b36e55e02a1614f6a22cb6 (diff)
downloadsystemd-fed66db05d54146a91cea64f20178d9db05cbdc7.tar.gz
tree-wide: use return value of log_xxx_errno()
Diffstat (limited to 'src/update-utmp')
-rw-r--r--src/update-utmp/update-utmp.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
index 0546486f73..59c49f2a80 100644
--- a/src/update-utmp/update-utmp.c
+++ b/src/update-utmp/update-utmp.c
@@ -133,10 +133,8 @@ static int on_reboot(Context *c) {
t = get_startup_time(c);
q = utmp_put_reboot(t);
- if (q < 0) {
- log_error_errno(q, "Failed to write utmp record: %m");
- r = q;
- }
+ if (q < 0)
+ r = log_error_errno(q, "Failed to write utmp record: %m");
return r;
}
@@ -157,10 +155,8 @@ static int on_shutdown(Context *c) {
#endif
q = utmp_put_shutdown();
- if (q < 0) {
- log_error_errno(q, "Failed to write utmp record: %m");
- r = q;
- }
+ if (q < 0)
+ r = log_error_errno(q, "Failed to write utmp record: %m");
return r;
}