X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fhelper%2Fcommand.c;h=3346a6c3798cdff0e242dc060b35dc33abcef544;hp=e8ade3f7039597edd810037e52e5e42d7c3037e0;hb=2b78f65aa9dd970ab481d16e202571c9bec450f3;hpb=e162200ab2cd6c2202bd437dca91137eacf9021c diff --git a/src/helper/command.c b/src/helper/command.c index e8ade3f703..3346a6c379 100644 --- a/src/helper/command.c +++ b/src/helper/command.c @@ -623,15 +623,13 @@ static int run_command(struct command_context *context, } } else if (retval == ERROR_COMMAND_CLOSE_CONNECTION) { /* just fall through for a shutdown request */ - } else if (retval != ERROR_OK) { - /* we do not print out an error message because the command *should* - * have printed out an error - */ - char *full_name = command_name(c, ' '); - LOG_DEBUG("Command '%s' failed with error code %d", - full_name ? full_name : c->name, retval); - free(full_name); } else { + if (retval != ERROR_OK) { + char *full_name = command_name(c, ' '); + LOG_DEBUG("Command '%s' failed with error code %d", + full_name ? full_name : c->name, retval); + free(full_name); + } /* Use the command output as the Tcl result */ Jim_SetResult(context->interp, cmd.output); }