X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjtag%2Fdrivers%2Fopendous.c;h=6881959c33761a348ae410b8fcf71e0e14a8d1b0;hb=08ee7bb982b16742f52cfdc6c649d82ffa2eb177;hp=82fcbc11950315c759cc696b481f01f7ba20adec;hpb=b159f5cdedd70fff9309722e927be670845f4df5;p=fw%2Fopenocd diff --git a/src/jtag/drivers/opendous.c b/src/jtag/drivers/opendous.c index 82fcbc119..6881959c3 100644 --- a/src/jtag/drivers/opendous.c +++ b/src/jtag/drivers/opendous.c @@ -161,7 +161,7 @@ COMMAND_HANDLER(opendous_handle_opendous_type_command) return ERROR_OK; /* only if the cable name wasn't overwritten by cmdline */ - if (opendous_type == NULL) { + if (!opendous_type) { /* REVISIT first verify that it's listed in cables[] ... */ opendous_type = strdup(CMD_ARGV[0]); } @@ -256,7 +256,7 @@ static int opendous_execute_queue(void) enum scan_type type; uint8_t *buffer; - while (cmd != NULL) { + while (cmd) { switch (cmd->type) { case JTAG_RUNTEST: LOG_DEBUG_IO("runtest %i cycles, end in %i", cmd->cmd.runtest->num_cycles, @@ -331,7 +331,7 @@ static int opendous_init(void) cur_opendous_probe = opendous_probes; - if (opendous_type == NULL) { + if (!opendous_type) { opendous_type = strdup("opendous"); LOG_WARNING("No opendous_type specified, using default 'opendous'"); }