summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/clean-ipc.c25
-rw-r--r--src/shared/pty.c6
2 files changed, 17 insertions, 14 deletions
diff --git a/src/shared/clean-ipc.c b/src/shared/clean-ipc.c
index 48b10865da..d1cdb151b2 100644
--- a/src/shared/clean-ipc.c
+++ b/src/shared/clean-ipc.c
@@ -78,8 +78,9 @@ static int clean_sysvipc_shm(uid_t delete_uid) {
if (errno == EIDRM || errno == EINVAL)
continue;
- log_warning_errno(errno, "Failed to remove SysV shared memory segment %i: %m", shmid);
- ret = -errno;
+ ret = log_warning_errno(errno,
+ "Failed to remove SysV shared memory segment %i: %m",
+ shmid);
}
}
@@ -130,8 +131,9 @@ static int clean_sysvipc_sem(uid_t delete_uid) {
if (errno == EIDRM || errno == EINVAL)
continue;
- log_warning_errno(errno, "Failed to remove SysV semaphores object %i: %m", semid);
- ret = -errno;
+ ret = log_warning_errno(errno,
+ "Failed to remove SysV semaphores object %i: %m",
+ semid);
}
}
@@ -183,8 +185,9 @@ static int clean_sysvipc_msg(uid_t delete_uid) {
if (errno == EIDRM || errno == EINVAL)
continue;
- log_warning_errno(errno, "Failed to remove SysV message queue %i: %m", msgid);
- ret = -errno;
+ ret = log_warning_errno(errno,
+ "Failed to remove SysV message queue %i: %m",
+ msgid);
}
}
@@ -302,8 +305,9 @@ static int clean_posix_mq(uid_t uid) {
if (errno == ENOENT)
continue;
- log_warning_errno(errno, "Failed to stat() MQ segment %s: %m", de->d_name);
- ret = -errno;
+ ret = log_warning_errno(errno,
+ "Failed to stat() MQ segment %s: %m",
+ de->d_name);
continue;
}
@@ -317,8 +321,9 @@ static int clean_posix_mq(uid_t uid) {
if (errno == ENOENT)
continue;
- log_warning_errno(errno, "Failed to unlink POSIX message queue %s: %m", fn);
- ret = -errno;
+ ret = log_warning_errno(errno,
+ "Failed to unlink POSIX message queue %s: %m",
+ fn);
}
}
diff --git a/src/shared/pty.c b/src/shared/pty.c
index a87b3ce6f0..35d9ff5f4d 100644
--- a/src/shared/pty.c
+++ b/src/shared/pty.c
@@ -311,9 +311,8 @@ static int pty_dispatch_read(Pty *pty) {
continue;
return (errno == EAGAIN) ? 0 : -errno;
- } else if (len == 0) {
+ } else if (len == 0)
continue;
- }
/* set terminating zero for debugging safety */
pty->in_buf[len] = 0;
@@ -356,9 +355,8 @@ static int pty_dispatch_write(Pty *pty) {
continue;
return (errno == EAGAIN) ? 1 : -errno;
- } else if (len == 0) {
+ } else if (len == 0)
continue;
- }
ring_pull(&pty->out_buf, (size_t)len);
}