diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 00711d46..be098b2b 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2003-05-27 Marcel Telka + + * src/part/part.c (part_set_signal, part_get_signal): Moved variable declarations to beginning + of a block (Matan Ziv-Av). + 2003-05-26 Marcel Telka * include/bus.h (new_sh7727_bus): Added function declaration. diff --git a/jtag/src/part/part.c b/jtag/src/part/part.c index 04061b71..f9cb12df 100644 --- a/jtag/src/part/part.c +++ b/jtag/src/part/part.c @@ -153,11 +153,13 @@ part_set_instruction( part_t *p, const char *iname ) void part_set_signal( part_t *p, signal_t *s, int out, int val ) { + data_register *bsr; + if (!p || !s) return; /* search for Boundary Scan Register */ - data_register *bsr = part_find_data_register( p, "BSR" ); + bsr = part_find_data_register( p, "BSR" ); if (!bsr) { printf( _("%s(%s:%d) Boundary Scan Register (BSR) not found\n"), __FUNCTION__, __FILE__, __LINE__ ); return; @@ -188,11 +190,13 @@ part_set_signal( part_t *p, signal_t *s, int out, int val ) int part_get_signal( part_t *p, signal_t *s ) { + data_register *bsr; + if (!p || !s) return -1; /* search for Boundary Scan Register */ - data_register *bsr = part_find_data_register( p, "BSR" ); + bsr = part_find_data_register( p, "BSR" ); if (!bsr) { printf( _("%s(%s:%d) Boundary Scan Register (BSR) not found\n"), __FUNCTION__, __FILE__, __LINE__ ); return -1;