summaryrefslogtreecommitdiff
path: root/src/pld
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-03-19 22:04:45 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-03-20 11:16:49 +0100
commit96949890ee29ab4b3ca15802302c5d93358b69e1 (patch)
tree5b7ca2428f594a96f3c716b3524c3d274bf05e71 /src/pld
parent3b310dbac5ae1db7fb768aa0789bbe101137c7e1 (diff)
downloadopenocd+libswd-96949890ee29ab4b3ca15802302c5d93358b69e1.tar.gz
openocd+libswd-96949890ee29ab4b3ca15802302c5d93358b69e1.tar.bz2
openocd+libswd-96949890ee29ab4b3ca15802302c5d93358b69e1.tar.xz
openocd+libswd-96949890ee29ab4b3ca15802302c5d93358b69e1.zip
jtag: move towards making out_value const
These were relatively straightforward fixes which are backwards compatible. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Diffstat (limited to 'src/pld')
-rw-r--r--src/pld/virtex2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/pld/virtex2.c b/src/pld/virtex2.c
index b2833fae..19637366 100644
--- a/src/pld/virtex2.c
+++ b/src/pld/virtex2.c
@@ -36,13 +36,14 @@ static int virtex2_set_instr(struct jtag_tap *tap, uint32_t new_instr)
struct scan_field field;
field.num_bits = tap->ir_length;
- field.out_value = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
- buf_set_u32(field.out_value, 0, field.num_bits, new_instr);
+ void * t = calloc(DIV_ROUND_UP(field.num_bits, 8), 1);
+ field.out_value = t;
+ buf_set_u32(t, 0, field.num_bits, new_instr);
field.in_value = NULL;
jtag_add_ir_scan(tap, &field, TAP_IDLE);
- free(field.out_value);
+ free(t);
}
return ERROR_OK;