diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-09 11:08:23 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-09 14:58:26 +0200 |
commit | 94c156cd452424ea59931920df2454d9da7cb774 (patch) | |
tree | f8ce0a2319c4a88b42b523002374473d6f1967a3 /src/shared | |
parent | 9c00a6adfa6c2ded071222b2ec76295480add34e (diff) |
tree-wide: make use of log_error_errno() return value in more cases
The previous coccinelle semantic patch that improved usage of
log_error_errno()'s return value, only looked for log_error_errno()
invocations with a single parameter after the error parameter. Update
the patch to handle arbitrary numbers of additional arguments.
Diffstat (limited to 'src/shared')
-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); } } |