From 96949890ee29ab4b3ca15802302c5d93358b69e1 Mon Sep 17 00:00:00 2001 From: Øyvind Harboe Date: Fri, 19 Mar 2010 22:04:45 +0100 Subject: jtag: move towards making out_value const MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These were relatively straightforward fixes which are backwards compatible. Signed-off-by: Øyvind Harboe --- src/pld/virtex2.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/pld/virtex2.c') 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; -- cgit v1.2.3