chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1189a9f
)
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
Sven Eden
<yamakuzure@gmx.net>
Wed, 30 May 2018 05:50:07 +0000
(07:50 +0200)
src/basic/log.c
patch
|
blob
|
history
diff --git
a/src/basic/log.c
b/src/basic/log.c
index 5bbf65a4a4f38fe722ceae0a105095c5a467d396..1f91dc4bad3c32c4f980538e3d3dc0fd1c2c7366 100644
(file)
--- a/
src/basic/log.c
+++ b/
src/basic/log.c
@@
-1247,10
+1247,12
@@
DEFINE_STRING_TABLE_LOOKUP(log_target, LogTarget);
#if 0 /// UNNEEDED by elogind
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).",