This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 365869b0a testing/ostest/signest.c: fix the range of signals
365869b0a is described below

commit 365869b0a2b1fa2e48e7e50041ac3765622268b2
Author: YAMAMOTO Takashi <yamam...@midokura.com>
AuthorDate: Thu Nov 14 21:59:33 2024 +0900

    testing/ostest/signest.c: fix the range of signals
    
    Note that MAX_SIGNO is a valid signal number.
---
 testing/ostest/signest.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/testing/ostest/signest.c b/testing/ostest/signest.c
index 5140f9cbb..a539986e9 100644
--- a/testing/ostest/signest.c
+++ b/testing/ostest/signest.c
@@ -143,7 +143,7 @@ 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))
         {
@@ -151,7 +151,7 @@ static FAR void *waiter_main(FAR void *arg)
         }
     }
 
-  for (i = 1; i < MAX_SIGNO; i++)
+  for (i = 1; i <= MAX_SIGNO; i++)
     {
       if (signest_catchable(i))
         {
@@ -322,7 +322,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))
             {
@@ -377,7 +377,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 */
 
@@ -439,7 +439,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 */
 

Reply via email to