diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-10-27 09:55:59 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-10-27 14:06:49 +0100 |
commit | 74d6421da08ff2ef4b081644438c3eb86d17eac6 (patch) | |
tree | ff702dfbbec3f13dcbc67129949e1554f23a7e2d | |
parent | core: clean up inactive/failed {service|scope}'s cgroups when the last proces... (diff) | |
download | systemd-74d6421da08ff2ef4b081644438c3eb86d17eac6.tar.xz systemd-74d6421da08ff2ef4b081644438c3eb86d17eac6.zip |
tree-wide: cast result of get_process_comm() to (void) where we ignore it
-rw-r--r-- | src/core/automount.c | 2 | ||||
-rw-r--r-- | src/core/killall.c | 2 | ||||
-rw-r--r-- | src/journal/journald-console.c | 2 | ||||
-rw-r--r-- | src/journal/journald-kmsg.c | 2 | ||||
-rw-r--r-- | src/journal/journald-syslog.c | 2 | ||||
-rw-r--r-- | src/journal/journald-wall.c | 2 | ||||
-rw-r--r-- | src/login/loginctl.c | 2 | ||||
-rw-r--r-- | src/systemctl/systemctl-logind.c | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/src/core/automount.c b/src/core/automount.c index 9c0dca1b3a..16b9104171 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -989,7 +989,7 @@ static int automount_dispatch_io(sd_event_source *s, int fd, uint32_t events, vo if (packet.v5_packet.pid > 0) { _cleanup_free_ char *p = NULL; - get_process_comm(packet.v5_packet.pid, &p); + (void) get_process_comm(packet.v5_packet.pid, &p); log_unit_info(UNIT(a), "Got automount request for %s, triggered by %"PRIu32" (%s)", a->where, packet.v5_packet.pid, strna(p)); } else log_unit_debug(UNIT(a), "Got direct mount request on %s", a->where); diff --git a/src/core/killall.c b/src/core/killall.c index 0272fdb0da..2b259985dc 100644 --- a/src/core/killall.c +++ b/src/core/killall.c @@ -214,7 +214,7 @@ static int killall(int sig, Set *pids, bool send_sighup) { if (sig == SIGKILL) { _cleanup_free_ char *s = NULL; - get_process_comm(pid, &s); + (void) get_process_comm(pid, &s); log_notice("Sending SIGKILL to PID "PID_FMT" (%s).", pid, strna(s)); } diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c index 80e2958597..9497ef9a4a 100644 --- a/src/journal/journald-console.c +++ b/src/journal/journald-console.c @@ -66,7 +66,7 @@ void server_forward_console( /* Second: identifier and PID */ if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c index 6e7c806fd8..ca60f398c8 100644 --- a/src/journal/journald-kmsg.c +++ b/src/journal/journald-kmsg.c @@ -58,7 +58,7 @@ void server_forward_kmsg( /* Second: identifier and PID */ if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/journal/journald-syslog.c b/src/journal/journald-syslog.c index 46013c3878..0da7dcfcf5 100644 --- a/src/journal/journald-syslog.c +++ b/src/journal/journald-syslog.c @@ -153,7 +153,7 @@ void server_forward_syslog(Server *s, int priority, const char *identifier, cons /* Third: identifier and PID */ if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/journal/journald-wall.c b/src/journal/journald-wall.c index 370c9b32e2..6134ba7414 100644 --- a/src/journal/journald-wall.c +++ b/src/journal/journald-wall.c @@ -27,7 +27,7 @@ void server_forward_wall( if (ucred) { if (!identifier) { - get_process_comm(ucred->pid, &ident_buf); + (void) get_process_comm(ucred->pid, &ident_buf); identifier = ident_buf; } diff --git a/src/login/loginctl.c b/src/login/loginctl.c index b7f400dc5e..28afc1bd09 100644 --- a/src/login/loginctl.c +++ b/src/login/loginctl.c @@ -485,7 +485,7 @@ static int print_session_status_info(sd_bus *bus, const char *path, bool *new_li printf("\t Leader: %"PRIu32, i.leader); - get_process_comm(i.leader, &t); + (void) get_process_comm(i.leader, &t); if (t) printf(" (%s)", t); diff --git a/src/systemctl/systemctl-logind.c b/src/systemctl/systemctl-logind.c index 20486c968e..7cd727986b 100644 --- a/src/systemctl/systemctl-logind.c +++ b/src/systemctl/systemctl-logind.c @@ -146,7 +146,7 @@ int logind_check_inhibitors(enum action a) { ACTION_KEXEC) ? "shutdown" : "sleep")) continue; - get_process_comm(pid, &comm); + (void) get_process_comm(pid, &comm); user = uid_to_name(uid); log_warning("Operation inhibited by \"%s\" (PID "PID_FMT" \"%s\", user %s), reason is \"%s\".", |