Use nsig instead of arbitrary numbers
* filter_qualify.c (sigstr_to_uint): Use nsig. * prctl.c (SYS_FUNC(prctl)) <case PR_SET_PDEATHSIG>: Use nsig.
This commit is contained in:
parent
6d024c6336
commit
bca1b70f6b
@ -52,12 +52,12 @@ static int
|
||||
sigstr_to_uint(const char *s)
|
||||
{
|
||||
if (*s >= '0' && *s <= '9')
|
||||
return string_to_uint_upto(s, 255);
|
||||
return string_to_uint_upto(s, nsig);
|
||||
|
||||
if (strncasecmp(s, "SIG", 3) == 0)
|
||||
s += 3;
|
||||
|
||||
for (int i = 0; i <= 255; ++i) {
|
||||
for (size_t i = 0; i <= nsig; i++) {
|
||||
const char *name = signame(i);
|
||||
|
||||
if (strncasecmp(name, "SIG", 3) != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user