projects
/
fw
/
openocd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8684bd1
)
transport: fix LOG_DEBUG gaffe
author
simon qian
<simonqian.openocd@gmail.com>
Thu, 13 Jan 2011 07:25:22 +0000
(08:25 +0100)
committer
Øyvind Harboe
<oyvind.harboe@zylin.com>
Thu, 13 Jan 2011 07:28:29 +0000
(08:28 +0100)
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>
src/jtag/transport.c
patch
|
blob
|
history
diff --git
a/src/jtag/transport.c
b/src/jtag/transport.c
index 5033ebc6df4a8ce498f6c79d4f781bef131c98f6..f570103cc7df2f84b4221bbd2a2a82f32a6817fe 100644
(file)
--- a/
src/jtag/transport.c
+++ b/
src/jtag/transport.c
@@
-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;
}
}