]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/basic/signal-util.c
tree-wide: add new SIGNAL_VALID() macro-like function that validates signal numbers
[thirdparty/systemd.git] / src / basic / signal-util.c
index e3047b209b65bb05af4c001e32e88bad78d070c5..280b5c3251ecc53f84baf906be816522e3f7a72c 100644 (file)
@@ -255,7 +255,7 @@ int signal_from_string(const char *s) {
         }
         if (safe_atou(s, &u) >= 0) {
                 signo = (int) u + offset;
-                if (signo > 0 && signo < _NSIG)
+                if (SIGNAL_VALID(signo))
                         return signo;
         }
         return -EINVAL;