summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-08 11:27:28 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:32 +0200
commit6eb7c172b58d81a5f6c3998ce304a7324fc65050 (patch)
treea720b0f860bc65bfc09cbbafe869b2974d7d0c16 /src/core/unit.c
parent4c310c073aec5a31a7e626ea8ceb86d3a28291aa (diff)
tree-wide: add new SIGNAL_VALID() macro-like function that validates signal numbers
And port all code over to use it.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index c028f57f13..a8174e6041 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -47,6 +47,7 @@
#include "path-util.h"
#include "process-util.h"
#include "set.h"
+#include "signal-util.h"
#include "special.h"
#include "stat-util.h"
#include "stdio-util.h"
@@ -3062,8 +3063,7 @@ bool unit_active_or_pending(Unit *u) {
int unit_kill(Unit *u, KillWho w, int signo, sd_bus_error *error) {
assert(u);
assert(w >= 0 && w < _KILL_WHO_MAX);
- assert(signo > 0);
- assert(signo < _NSIG);
+ assert(SIGNAL_VALID(signo));
if (!UNIT_VTABLE(u)->kill)
return -EOPNOTSUPP;