tree-wide: cast result of get_process_comm() to (void) where we ignore it
This commit is contained in:
parent
e08dabfec7
commit
74d6421da0
|
@ -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);
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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\".",
|
||||
|
|
Loading…
Reference in a new issue