forked from auracaster/openocd
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:
@@ -298,10 +298,10 @@ COMMAND_HANDLER(handle_tcl_notifications_command)
|
||||
struct connection *connection = NULL;
|
||||
struct tcl_connection *tclc = NULL;
|
||||
|
||||
if (CMD_CTX->output_handler_priv != NULL)
|
||||
if (CMD_CTX->output_handler_priv)
|
||||
connection = CMD_CTX->output_handler_priv;
|
||||
|
||||
if (connection != NULL && !strcmp(connection->service->name, "tcl")) {
|
||||
if (connection && !strcmp(connection->service->name, "tcl")) {
|
||||
tclc = connection->priv;
|
||||
return CALL_COMMAND_HANDLER(handle_command_parse_bool, &tclc->tc_notify, "Target Notification output ");
|
||||
} else {
|
||||
@@ -315,10 +315,10 @@ COMMAND_HANDLER(handle_tcl_trace_command)
|
||||
struct connection *connection = NULL;
|
||||
struct tcl_connection *tclc = NULL;
|
||||
|
||||
if (CMD_CTX->output_handler_priv != NULL)
|
||||
if (CMD_CTX->output_handler_priv)
|
||||
connection = CMD_CTX->output_handler_priv;
|
||||
|
||||
if (connection != NULL && !strcmp(connection->service->name, "tcl")) {
|
||||
if (connection && !strcmp(connection->service->name, "tcl")) {
|
||||
tclc = connection->priv;
|
||||
return CALL_COMMAND_HANDLER(handle_command_parse_bool, &tclc->tc_trace, "Target trace output ");
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user