Skip to content

Commit

Permalink
testing/ostest/signest.c: fix the range of signals
Browse files Browse the repository at this point in the history
Note that MAX_SIGNO is a valid signal number.
  • Loading branch information
yamt committed Nov 22, 2024
1 parent 3cbcbb6 commit 5c6a4a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions testing/ostest/signest.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ static FAR void *waiter_main(FAR void *arg)
act.sa_flags = 0;

sigemptyset(&act.sa_mask);
for (i = 1; i < MAX_SIGNO; i += 2)
for (i = 1; i <= MAX_SIGNO; i += 2)
{
if (signest_catchable(i))
{
sigaddset(&act.sa_mask, i);
}
}

for (i = 1; i < MAX_SIGNO; i++)
for (i = 1; i <= MAX_SIGNO; i++)
{
if (signest_catchable(i))
{
Expand Down Expand Up @@ -324,7 +324,7 @@ void signest_test(void)

for (i = 0; i < 10; i++)
{
for (j = 1; j < MAX_SIGNO; j += 2)
for (j = 1; j + 1 <= MAX_SIGNO; j += 2)
{
if (signest_catchable(j))
{
Expand Down Expand Up @@ -379,7 +379,7 @@ void signest_test(void)

for (i = 0; i < 10; i++)
{
for (j = 1; j < MAX_SIGNO; j += 2)
for (j = 1; j + 1 <= MAX_SIGNO; j += 2)
{
/* Odd then even */

Expand Down Expand Up @@ -441,7 +441,7 @@ void signest_test(void)

for (i = 0; i < 10; i++)
{
for (j = 1; j < MAX_SIGNO; j += 2)
for (j = 1; j + 1 <= MAX_SIGNO; j += 2)
{
/* Odd then even */

Expand Down

0 comments on commit 5c6a4a2

Please sign in to comment.