summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-07 05:24:27 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-06-07 05:24:27 +0000
commit7dd875457569d7745f8f47a5b7964e29ef98b08f (patch)
tree8667af63c1e5311769d954c1d14d50f5472451f6 /src
parentb550f70100794d8dfa91d2760324041828836f82 (diff)
downloadopenocd_libswd-7dd875457569d7745f8f47a5b7964e29ef98b08f.tar.gz
openocd_libswd-7dd875457569d7745f8f47a5b7964e29ef98b08f.tar.bz2
openocd_libswd-7dd875457569d7745f8f47a5b7964e29ef98b08f.tar.xz
openocd_libswd-7dd875457569d7745f8f47a5b7964e29ef98b08f.zip
Factoring of jtag_examine_chain for maintainability:
- Improve variable type: change device_count to unsigned. - Improves jtag_tap_count_enabled() API too (now returns unsigned). git-svn-id: svn://svn.berlios.de/openocd/trunk@2091 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/jtag/jtag.c6
-rw-r--r--src/jtag/jtag.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index 96565d94..2a81b086 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -242,10 +242,10 @@ int jtag_tap_count(void)
return jtag_num_taps;
}
-int jtag_tap_count_enabled(void)
+unsigned jtag_tap_count_enabled(void)
{
jtag_tap_t *t;
- int n;
+ unsigned n;
n = 0;
t = jtag_all_taps();
@@ -1065,7 +1065,7 @@ static bool jtag_examine_chain_match_tap(const struct jtag_tap_s *tap)
static int jtag_examine_chain(void)
{
u8 idcode_buffer[JTAG_MAX_CHAIN_SIZE * 4];
- int device_count = 0;
+ unsigned device_count = 0;
jtag_examine_chain_execute(idcode_buffer, JTAG_MAX_CHAIN_SIZE);
diff --git a/src/jtag/jtag.h b/src/jtag/jtag.h
index 89b1de82..809708dc 100644
--- a/src/jtag/jtag.h
+++ b/src/jtag/jtag.h
@@ -181,7 +181,7 @@ extern jtag_tap_t* jtag_tap_by_position(int n);
extern jtag_tap_t* jtag_tap_by_string(const char* dotted_name);
extern jtag_tap_t* jtag_tap_by_jim_obj(Jim_Interp* interp, Jim_Obj* obj);
extern jtag_tap_t* jtag_tap_by_abs_position(int abs_position);
-extern int jtag_tap_count_enabled(void);
+extern unsigned jtag_tap_count_enabled(void);
extern int jtag_tap_count(void);
static __inline__ jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p)