mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:22:18 +08:00
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 <zhangshoukui@xiaomi.com>
This commit is contained in:
committed by
Mateusz Szafoni
parent
44cce29d12
commit
2c543c27bf
@@ -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 */
|
/* Get the index to the last cleaner function pushed onto the stack */
|
||||||
|
|
||||||
ndx = tls->tl_tos - 1;
|
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? */
|
/* Should we execute the cleanup routine at the top of the stack? */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user