projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e4b889
)
log: minor modernizations to log_received_signal()
author
Lennart Poettering
<lennart@poettering.net>
Thu, 11 Jan 2018 12:09:30 +0000
(13:09 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 11 Jan 2018 13:44:31 +0000
(14:44 +0100)
src/basic/log.c
patch
|
blob
|
history
diff --git
a/src/basic/log.c
b/src/basic/log.c
index
b1b4486
..
318c55e
100644
(file)
--- a/
src/basic/log.c
+++ b/
src/basic/log.c
@@
-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).",