summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-09 02:23:03 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-09 02:23:03 +0000
commitd706eb206ea95275bc633eb1b59e6398927ce3a6 (patch)
tree5fceed9957ad3b0d6d70b973699541c4a7252d23
parentff85ad7c12a79273db5248d3b121fec3ad6db583 (diff)
downloadopenocd_libswd-d706eb206ea95275bc633eb1b59e6398927ce3a6.tar.gz
openocd_libswd-d706eb206ea95275bc633eb1b59e6398927ce3a6.tar.bz2
openocd_libswd-d706eb206ea95275bc633eb1b59e6398927ce3a6.tar.xz
openocd_libswd-d706eb206ea95275bc633eb1b59e6398927ce3a6.zip
Cleanup jtag_tap_count_enabled.
git-svn-id: svn://svn.berlios.de/openocd/trunk@2139 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/jtag/jtag.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index e8b66d15..12fff16c 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -257,15 +257,12 @@ int jtag_tap_count(void)
unsigned jtag_tap_count_enabled(void)
{
- jtag_tap_t *t;
- unsigned n;
-
- n = 0;
- t = jtag_all_taps();
- while(t){
- if( t->enabled ){
+ jtag_tap_t *t = jtag_all_taps();
+ unsigned n = 0;
+ while(t)
+ {
+ if (t->enabled)
n++;
- }
t = t->next_tap;
}
return n;