]> git.sur5r.net Git - openocd/commit
Simplify the handle_md_command routine in target.c:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 31 May 2009 06:00:28 +0000 (06:00 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 31 May 2009 06:00:28 +0000 (06:00 +0000)
commit678519311834fd7a1126f8d217c734d4f5ffbb3d
treea7648d09dc00a1cb2a57aa6645d5bf90fbdf05e9
parent55f21192b0e0ae82cee6b69eb87b501acf414751
Simplify the handle_md_command routine in target.c:
 - fix buffer overrun in mdw; final '\0' would overflow the output buffer.
 - return ERROR_COMMAND_SYNTAX_ERROR instead of ERROR_OK if:
   - less than one argument is provided
   - the command is called with a name other than mdb, mdh, or mdw.
 - factor all command output into new handle_md_output function

git-svn-id: svn://svn.berlios.de/openocd/trunk@1958 b42882b7-edfa-0310-969c-e2dbd0fdcd60
src/target/target.c