summaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2011-03-20 19:44:48 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2011-03-20 19:47:58 +0100
commit17201b584776704c80ac5089874f244757b3744e (patch)
tree2d7eb6c246a010a5121711071728079a2f5ba171 /src/target
parent558f760ff06c499b4525dcb4ba731f585256dacb (diff)
downloadopenocd_libswd-17201b584776704c80ac5089874f244757b3744e.tar.gz
openocd_libswd-17201b584776704c80ac5089874f244757b3744e.tar.bz2
openocd_libswd-17201b584776704c80ac5089874f244757b3744e.tar.xz
openocd_libswd-17201b584776704c80ac5089874f244757b3744e.zip
dsp563xx_once: fix warning and potential bug
I don't think dsp563xx_once_read_register() would ever be called with len==0, but it would have been broken in that case. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/target')
-rw-r--r--src/target/dsp563xx_once.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/dsp563xx_once.c b/src/target/dsp563xx_once.c
index d95dcdfd..267f475e 100644
--- a/src/target/dsp563xx_once.c
+++ b/src/target/dsp563xx_once.c
@@ -188,7 +188,7 @@ int dsp563xx_once_request_debug(struct jtag_tap *tap, int reset_state)
int dsp563xx_once_read_register(struct jtag_tap *tap, int flush, struct once_reg *regs, int len)
{
int i;
- int err;
+ int err = ERROR_OK;
for (i = 0; i < len; i++)
{