X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Frtos%2Fnuttx.c;h=c52547120c1383688324520d6c9819bbab2fdada;hb=8446e140181e85bab82daa273c1637b1eab01bd5;hp=0705b17b3526259cd9441a6ed27f0a6e1ffaabeb;hpb=ef0aa38c108be536deff73c299ba542e215a892f;p=openocd.git diff --git a/src/rtos/nuttx.c b/src/rtos/nuttx.c index 0705b17b35..c52547120c 100644 --- a/src/rtos/nuttx.c +++ b/src/rtos/nuttx.c @@ -314,7 +314,7 @@ static int nuttx_update_threads(struct rtos *rtos) state = tcb.dat[state_offset - 8]; thread->extra_info_str = NULL; - if (state < sizeof(task_state_str)/sizeof(char *)) { + if (state < ARRAY_SIZE(task_state_str)) { thread->extra_info_str = malloc(256); snprintf(thread->extra_info_str, 256, "pid:%d, %s", tcb.dat[pid_offset - 8] |