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 <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/6351 Tested-by: jenkins
This commit is contained in:
@@ -1028,7 +1028,7 @@ int dap_lookup_cs_component(struct adiv5_ap *ap,
|
||||
static int dap_read_part_id(struct adiv5_ap *ap, target_addr_t component_base, uint32_t *cid, uint64_t *pid)
|
||||
{
|
||||
assert((component_base & 0xFFF) == 0);
|
||||
assert(ap != NULL && cid != NULL && pid != NULL);
|
||||
assert(ap && cid && pid);
|
||||
|
||||
uint32_t cid0, cid1, cid2, cid3;
|
||||
uint32_t pid0, pid1, pid2, pid3, pid4;
|
||||
|
||||
Reference in New Issue
Block a user