]> git.sur5r.net Git - openocd/commitdiff
Cleanup jtag_tap_count_enabled.
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 9 Jun 2009 02:23:03 +0000 (02:23 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 9 Jun 2009 02:23:03 +0000 (02:23 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2139 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c

index e8b66d154f6a651edbcf71d54c221e007bb43b87..12fff16cf96b15243d91950c277996d65b0fc609 100644 (file)
@@ -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;