summaryrefslogtreecommitdiff
path: root/src/coredump
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-03-27 14:36:36 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-03-27 18:09:56 +0100
commit6990fb6bc6f9421a15a3e0b02909b7526cd4cbfc (patch)
treedb2aeb45c8616b52c10f616de5bfc27462add82c /src/coredump
parent36dbf9717030d0a9d69df2e6180284834fa8a851 (diff)
downloadsystemd-6990fb6bc6f9421a15a3e0b02909b7526cd4cbfc.tar.gz
systemd-6990fb6bc6f9421a15a3e0b02909b7526cd4cbfc.tar.bz2
systemd-6990fb6bc6f9421a15a3e0b02909b7526cd4cbfc.zip
tree-wide: (void)ify a few unlink() and rmdir()
Let's be helpful to static analyzers which care about whether we knowingly ignore return values. We do in these cases, since they are usually part of error paths.
Diffstat (limited to 'src/coredump')
-rw-r--r--src/coredump/coredumpctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c
index fbee242962..b239d81945 100644
--- a/src/coredump/coredumpctl.c
+++ b/src/coredump/coredumpctl.c
@@ -859,7 +859,7 @@ static int save_core(sd_journal *j, FILE *file, char **path, bool *unlink_temp)
error:
if (temp) {
- unlink(temp);
+ (void) unlink(temp);
log_debug("Removed temporary file %s", temp);
}
return r;
@@ -985,7 +985,7 @@ finish:
if (unlink_path) {
log_debug("Removed temporary file %s", path);
- unlink(path);
+ (void) unlink(path);
}
return r;