mirror of
git://git.code.sf.net/p/openocd/code
synced 2025-07-24 02:44:25 +10:00
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>
This commit is contained in:
parent
8684bd1342
commit
8eb92c7e99
@ -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…
Reference in New Issue
Block a user