Cleanup jtag_tap_by_abs_position:
- Remove unused orig_n local variable. - Merge variable declaration with first use. - Update code to use current style guidelines. git-svn-id: svn://svn.berlios.de/openocd/trunk@2143 b42882b7-edfa-0310-969c-e2dbd0fdcd60__archive__
parent
009034f56c
commit
0c3e5b5069
|
@ -313,16 +313,11 @@ jtag_tap_t *jtag_tap_by_jim_obj(Jim_Interp *interp, Jim_Obj *o)
|
||||||
/* returns a pointer to the n-th device in the scan chain */
|
/* returns a pointer to the n-th device in the scan chain */
|
||||||
jtag_tap_t *jtag_tap_by_abs_position(int n)
|
jtag_tap_t *jtag_tap_by_abs_position(int n)
|
||||||
{
|
{
|
||||||
int orig_n;
|
jtag_tap_t *t = jtag_all_taps();
|
||||||
jtag_tap_t *t;
|
|
||||||
|
|
||||||
orig_n = n;
|
while (t && n-- > 0)
|
||||||
t = jtag_all_taps();
|
|
||||||
|
|
||||||
while( t && (n > 0)) {
|
|
||||||
n--;
|
|
||||||
t = t->next_tap;
|
t = t->next_tap;
|
||||||
}
|
|
||||||
return t;
|
return t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue