1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 09:56:51 +03:00

log: minor modernizations to log_received_signal()

This commit is contained in:
Lennart Poettering 2018-01-11 13:09:30 +01:00
parent 9e4b889366
commit a6ab236595

View File

@ -1226,10 +1226,12 @@ static const char *const log_target_table[_LOG_TARGET_MAX] = {
DEFINE_STRING_TABLE_LOOKUP(log_target, LogTarget);
void log_received_signal(int level, const struct signalfd_siginfo *si) {
if (si->ssi_pid > 0) {
assert(si);
if (pid_is_valid(si->ssi_pid)) {
_cleanup_free_ char *p = NULL;
get_process_comm(si->ssi_pid, &p);
(void) get_process_comm(si->ssi_pid, &p);
log_full(level,
"Received SIG%s from PID %"PRIu32" (%s).",