openocd: remove NULL comparisons with checkpatch [2/2]

Patch generated automatically through a modified checkpatch that
detects the patterns
	if (NULL == symbol)
	if (NULL != symbol)
and through flags "--types COMPARISON_TO_NULL --fix-inplace".

The unmodified checkpatch detects this pattern as Yoda condition,
but it's odd fixing it as Yoda condition and then again as NULL
comparison. This triggered the modification to the script.

Change-Id: I5fe984a85e9c4fc799f049211797aef891ebce18
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6352
Tested-by: jenkins
This commit is contained in:
Antonio Borneo
2021-07-03 21:47:55 +02:00
parent 3917823187
commit 0a1f904707
12 changed files with 20 additions and 20 deletions

View File

@@ -262,7 +262,7 @@ static struct command_context *setup_command_handler(Jim_Interp *interp)
&arm_tpiu_swo_register_commands,
NULL
};
for (unsigned i = 0; NULL != command_registrants[i]; i++) {
for (unsigned i = 0; command_registrants[i]; i++) {
int retval = (*command_registrants[i])(cmd_ctx);
if (retval != ERROR_OK) {
command_done(cmd_ctx);