diff options
author | Daniel Mack <github@zonque.org> | 2015-09-09 15:12:28 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-09-09 15:12:28 +0200 |
commit | d7acddde057d25a4fb7835943ef3c73f262ba54f (patch) | |
tree | cb6e0ab245a4ed43f1367b8164b8022f0e77fc13 /src/shared/clean-ipc.c | |
parent | 02736a9abce02eb53b0d504f96fc7b3e4f077020 (diff) | |
parent | 57255510c95ca3369d241502f26d7bbd8fac30a6 (diff) |
Merge pull request #1216 from poettering/coccinelle-fixes-2
Coccinelle fixes 2
Diffstat (limited to 'src/shared/clean-ipc.c')
-rw-r--r-- | src/shared/clean-ipc.c | 25 |
1 files changed, 15 insertions, 10 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); } } |