From: Zach W. <zw...@us...> - 2009-11-18 12:39:17
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via 59f32cbe53ccd8725e01968fcbc716cc5768a36b (commit) from 6e95f16d0a7d2b07caa1340b3bc3c2309ea12043 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 59f32cbe53ccd8725e01968fcbc716cc5768a36b Author: Zachary T Welch <zw...@su...> Date: Wed Nov 18 03:34:52 2009 -0800 fix regression in md/mw commands The recent migration broke them, the fixes broken them in a new way, but this should restore them to working order. Eliminates the temporary variable, as the CMD_NAME macro can once again be use in routines that increment CMD_ARGV without nasty side-effects. diff --git a/src/target/target.c b/src/target/target.c index bf83da0..98e7a40 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -2248,8 +2248,7 @@ COMMAND_HANDLER(handle_md_command) return ERROR_COMMAND_SYNTAX_ERROR; unsigned size = 0; - const char *cmd_name = CMD_NAME; - switch (cmd_name[6]) { + switch (CMD_NAME[2]) { case 'w': size = 4; break; case 'h': size = 2; break; case 'b': size = 1; break; @@ -2301,7 +2300,6 @@ COMMAND_HANDLER(handle_mw_command) bool physical=strcmp(CMD_ARGV[0], "phys")==0; int (*fn)(struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer); - const char *cmd_name = CMD_NAME; if (physical) { CMD_ARGC--; @@ -2327,7 +2325,7 @@ COMMAND_HANDLER(handle_mw_command) struct target *target = get_current_target(CMD_CTX); unsigned wordsize; uint8_t value_buf[4]; - switch (cmd_name[6]) + switch (CMD_NAME[2]) { case 'w': wordsize = 4; ----------------------------------------------------------------------- Summary of changes: src/target/target.c | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |