From 391782318723915bd259eadf9469251c13c8fa9c Mon Sep 17 00:00:00 2001 From: Antonio Borneo Date: Sat, 3 Jul 2021 21:29:32 +0200 Subject: openocd: remove NULL comparisons with checkpatch [1/2] Patch generated automatically through the new checkpatch with flags "--types COMPARISON_TO_NULL --fix-inplace". This only fixes the comparisons if (symbol == NULL) if (symbol != NULL) The case of NULL on the left side of the comparison is not tested. Some automatic fix is incorrect and has been massaged by hands: - if (*psig == NULL) + if (*!psig) changed as + if (!*psig) Change-Id: If4a1e2b4e547e223532e8e3d9da89bf9cb382ce6 Signed-off-by: Antonio Borneo Reviewed-on: http://openocd.zylin.com/6351 Tested-by: jenkins --- src/rtos/ThreadX.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/rtos/ThreadX.c') diff --git a/src/rtos/ThreadX.c b/src/rtos/ThreadX.c index c7effe7..788edc0 100644 --- a/src/rtos/ThreadX.c +++ b/src/rtos/ThreadX.c @@ -491,7 +491,7 @@ static int threadx_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_li static bool threadx_detect_rtos(struct target *target) { - if ((target->rtos->symbols != NULL) && + if ((target->rtos->symbols) && (target->rtos->symbols[THREADX_VAL_TX_THREAD_CREATED_PTR].address != 0)) { /* looks like ThreadX */ return true; -- cgit v1.1