target: drop comparison to NULL
Fix checkpatch error: ERROR:COMPARISON_TO_NULL: Comparison to NULL could be written "cmd_ctx" Change-Id: I3615fc427f8b160d44b6edbf7a066a086cab99bb Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8495 Tested-by: jenkins Reviewed-by: zapb <dev@zapb.de>
This commit is contained in:
parent
39197cdb4e
commit
66006d83b9
|
@ -4596,7 +4596,7 @@ static int target_jim_write_memory(Jim_Interp *interp, int argc,
|
||||||
}
|
}
|
||||||
|
|
||||||
struct command_context *cmd_ctx = current_command_context(interp);
|
struct command_context *cmd_ctx = current_command_context(interp);
|
||||||
assert(cmd_ctx != NULL);
|
assert(cmd_ctx);
|
||||||
struct target *target = get_current_target(cmd_ctx);
|
struct target *target = get_current_target(cmd_ctx);
|
||||||
|
|
||||||
const size_t buffersize = 4096;
|
const size_t buffersize = 4096;
|
||||||
|
@ -4739,7 +4739,7 @@ static int target_jim_get_reg(Jim_Interp *interp, int argc,
|
||||||
return JIM_ERR;
|
return JIM_ERR;
|
||||||
|
|
||||||
struct command_context *cmd_ctx = current_command_context(interp);
|
struct command_context *cmd_ctx = current_command_context(interp);
|
||||||
assert(cmd_ctx != NULL);
|
assert(cmd_ctx);
|
||||||
const struct target *target = get_current_target(cmd_ctx);
|
const struct target *target = get_current_target(cmd_ctx);
|
||||||
|
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue