]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: cast result of get_process_comm() to (void) where we ignore it
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2020 08:55:59 +0000 (09:55 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2020 13:06:49 +0000 (14:06 +0100)
src/core/automount.c
src/core/killall.c
src/journal/journald-console.c
src/journal/journald-kmsg.c
src/journal/journald-syslog.c
src/journal/journald-wall.c
src/login/loginctl.c
src/systemctl/systemctl-logind.c

index 9c0dca1b3a78c38fa82340a120e9a23fbb8623f1..16b9104171c5657987a71ea139edb0ec7efc83f4 100644 (file)
@@ -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);
index 0272fdb0da5def7c35c003f357dad2748072d6e3..2b259985dcb917831cbcce8c44b26e77188b360e 100644 (file)
@@ -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));
                 }
 
index 80e29585978f527cb91b1061e712bffbcf1b1d59..9497ef9a4af51b7becdd1728272d052f2af7b3a0 100644 (file)
@@ -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;
                 }
 
index 6e7c806fd8218bde2f51a36f395dd607579504c4..ca60f398c89cf67adaafe272fdf03bf686b65bc7 100644 (file)
@@ -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;
                 }
 
index 46013c38784d2f1c88b7278bac8f70839f702114..0da7dcfcf56cffa3df510d8bf3ee3f5d053860bb 100644 (file)
@@ -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;
                 }
 
index 370c9b32e2da88ffb3cc6314b63ced0757991e9d..6134ba7414e2408b4c51554e6d2c764e3994f619 100644 (file)
@@ -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;
                 }
 
index b7f400dc5e2c225f5cd30cf42e2f0b26d1126d79..28afc1bd0930af805e46335c814ee71012ece814 100644 (file)
@@ -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);
 
index 20486c968ea1ed40b3000fcba49df32600ffe23f..7cd727986b1955355d77d09e85ed83e423065986 100644 (file)
@@ -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\".",