From: Øyvind Harboe Date: Sun, 20 Mar 2011 18:44:48 +0000 (+0100) Subject: dsp563xx_once: fix warning and potential bug X-Git-Tag: v0.5.0-rc1~131 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=17201b584776704c80ac5089874f244757b3744e;p=openocd 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 --- 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++) {