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:
Shoukui Zhang 2024-03-28 11:01:52 +08:00 committed by Mateusz Szafoni
parent 44cce29d12
commit 2c543c27bf

View File

@ -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? */