From: Zach W. <zw...@us...> - 2009-11-11 23:39:05
|
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 5e1b500b173c7abaf9b78e32d31140c1bd4ba090 (commit) from 158698e3331b446243b863ab8b58ebee2c56f0cc (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 5e1b500b173c7abaf9b78e32d31140c1bd4ba090 Author: Zachary T Welch <zw...@su...> Date: Tue Nov 10 23:10:26 2009 -0800 fix 'jtag interface' behavior Without this patch, running "openocd -c 'jtag interface'" segfaults. Now, it returns the string "undefined" when the interface is unset. diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index 71efc8b..b86e006 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -422,7 +422,8 @@ static int jim_jtag_command(Jim_Interp *interp, int argc, Jim_Obj *const *argv) Jim_WrongNumArgs(goi.interp, 1, goi.argv-1, "(no params)"); return JIM_ERR; } - Jim_SetResultString(goi.interp, jtag_interface->name, -1); + const char *name = jtag_interface ? jtag_interface->name : NULL; + Jim_SetResultString(goi.interp, name ? : "undefined", -1); return JIM_OK; case JTAG_CMD_INIT: if (goi.argc != 0) { ----------------------------------------------------------------------- Summary of changes: src/jtag/tcl.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) hooks/post-receive -- Main OpenOCD repository |