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/target/armv7a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/target/armv7a.c') diff --git a/src/target/armv7a.c b/src/target/armv7a.c index cc8c19a..6de79c3 100644 --- a/src/target/armv7a.c +++ b/src/target/armv7a.c @@ -483,7 +483,7 @@ int armv7a_identify_cache(struct target *target) goto done; /* if no l2 cache initialize l1 data cache flush function function */ - if (armv7a->armv7a_mmu.armv7a_cache.flush_all_data_cache == NULL) { + if (!armv7a->armv7a_mmu.armv7a_cache.flush_all_data_cache) { armv7a->armv7a_mmu.armv7a_cache.flush_all_data_cache = armv7a_cache_auto_flush_all_data; } -- cgit v1.1