summaryrefslogtreecommitdiffstats
path: root/src/core/automount.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/automount.c')
-rw-r--r--src/core/automount.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/core/automount.c b/src/core/automount.c
index 1fc3fc0f82..550a350a45 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -425,10 +425,7 @@ static int autofs_set_timeout(int dev_autofs_fd, int ioctl_fd, usec_t usec) {
/* Convert to seconds, rounding up. */
param.timeout.timeout = DIV_ROUND_UP(usec, USEC_PER_SEC);
- if (ioctl(dev_autofs_fd, AUTOFS_DEV_IOCTL_TIMEOUT, &param) < 0)
- return -errno;
-
- return 0;
+ return RET_NERRNO(ioctl(dev_autofs_fd, AUTOFS_DEV_IOCTL_TIMEOUT, &param));
}
static int autofs_send_ready(int dev_autofs_fd, int ioctl_fd, uint32_t token, int status) {
@@ -446,10 +443,7 @@ static int autofs_send_ready(int dev_autofs_fd, int ioctl_fd, uint32_t token, in
} else
param.ready.token = token;
- if (ioctl(dev_autofs_fd, status ? AUTOFS_DEV_IOCTL_FAIL : AUTOFS_DEV_IOCTL_READY, &param) < 0)
- return -errno;
-
- return 0;
+ return RET_NERRNO(ioctl(dev_autofs_fd, status ? AUTOFS_DEV_IOCTL_FAIL : AUTOFS_DEV_IOCTL_READY, &param));
}
static int automount_send_ready(Automount *a, Set *tokens, int status) {