summaryrefslogtreecommitdiff
path: root/src/event/SignalMonitor.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2016-06-20 10:25:28 +0200
committerMax Kellermann <max@duempel.org>2016-06-20 10:46:36 +0200
commit4280f845359af5e40ef408f739afb44fea94fe19 (patch)
treec8ad9e7329b4cfb9b9ba583d682464021df9eac4 /src/event/SignalMonitor.cxx
parentc3d9c326155a763314eb75856e57c98d135a8dcc (diff)
event/SignalMonitor: use BoundMethod instead of raw function pointer
Diffstat (limited to 'src/event/SignalMonitor.cxx')
-rw-r--r--src/event/SignalMonitor.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/event/SignalMonitor.cxx b/src/event/SignalMonitor.cxx
index 0e1f4b4f4..16e05b1f6 100644
--- a/src/event/SignalMonitor.cxx
+++ b/src/event/SignalMonitor.cxx
@@ -158,7 +158,7 @@ SignalMonitorFinish()
sa.sa_handler = SIG_DFL;
for (unsigned i = 0; i < MAX_SIGNAL; ++i) {
- if (signal_handlers[i] != nullptr) {
+ if (signal_handlers[i]) {
x_sigaction(i, sa);
signal_handlers[i] = nullptr;
}
@@ -179,7 +179,7 @@ SignalMonitorGetEventLoop()
void
SignalMonitorRegister(int signo, SignalHandler handler)
{
- assert(signal_handlers[signo] == nullptr);
+ assert(!signal_handlers[signo]);
#ifndef USE_SIGNALFD
assert(!signal_pending[signo]);
#endif
@@ -209,7 +209,7 @@ SignalMonitor::OnSocketReady(unsigned)
int signo;
while ((signo = fd.Read()) >= 0) {
assert(unsigned(signo) < MAX_SIGNAL);
- assert(signal_handlers[signo] != nullptr);
+ assert(signal_handlers[signo]);
signal_handlers[signo]();
}