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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2c543c27bf Fix greater-than-or-equal-to-zero issue
2c543c27bf is described below

commit 2c543c27bf184adc685b63008d6f589b41bfb114
Author: Shoukui Zhang <[email protected]>
AuthorDate: Thu Mar 28 11:01:52 2024 +0800

    Fix greater-than-or-equal-to-zero issue
    
    unsigned_compare: This greater-than-or-equal-to-zero comparison without a 
signed value is always true. ndx >= 0U
    
    Signed-off-by: Shoukui Zhang <[email protected]>
---
 libs/libc/tls/tls_cleanup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/libc/tls/tls_cleanup.c b/libs/libc/tls/tls_cleanup.c
index acf52affe2..5ee7bbaa8a 100644
--- a/libs/libc/tls/tls_cleanup.c
+++ b/libs/libc/tls/tls_cleanup.c
@@ -62,7 +62,7 @@ void tls_cleanup_pop(FAR struct tls_info_s *tls, int execute)
       /* Get the index to the last cleaner function pushed onto the stack */
 
       ndx = tls->tl_tos - 1;
-      DEBUGASSERT(ndx >= 0 && ndx < CONFIG_TLS_NCLEANUP);
+      DEBUGASSERT(ndx < CONFIG_TLS_NCLEANUP);
 
       /* Should we execute the cleanup routine at the top of the stack? */
 

Reply via email to