summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index d356686f78..6e48671ee6 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7246,12 +7246,9 @@ static int talk_initctl(void) {
return -errno;
}
- errno = 0;
- r = loop_write(fd, &request, sizeof(request), false) != sizeof(request);
- if (r) {
- log_error_errno(errno, "Failed to write to "INIT_FIFO": %m");
- return errno > 0 ? -errno : -EIO;
- }
+ r = loop_write(fd, &request, sizeof(request), false);
+ if (r < 0)
+ return log_error_errno(r, "Failed to write to "INIT_FIFO": %m");
return 1;
}