Browse Source

transport: fix LOG_DEBUG gaffe

LOG_DEBUG() arguments are only evaluated when DEBUG logging
is enabled, do not use arguments that have side effects
like foo++.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
tags/v0.5.0-rc1
simon qian 13 years ago
committed by Øyvind Harboe
parent
commit
8eb92c7e99
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      src/jtag/transport.c

+ 4
- 2
src/jtag/transport.c View File

@@ -125,8 +125,10 @@ int allow_transports(struct command_context *ctx, const char **vector)
} else {
/* guard against user config errors */
LOG_WARNING("must select a transport.");
while (*vector)
LOG_DEBUG("allow transport '%s'", *vector++);
while (*vector) {
LOG_DEBUG("allow transport '%s'", *vector);
vector++;
}
return ERROR_OK;
}
}


Loading…
Cancel
Save