]> git.sur5r.net Git - openocd/commitdiff
Use unsigned type for jtag_tap_count and jtag_tap_by_abs_position.
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 9 Jun 2009 02:23:53 +0000 (02:23 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Tue, 9 Jun 2009 02:23:53 +0000 (02:23 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2144 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c
src/jtag/jtag.h

index 05cfd94801dcf5b4406389d61c80194313124308..0d7cdb3dd43280fcb056879fdbb0930f0cbf3b29 100644 (file)
@@ -71,7 +71,7 @@ static jtag_tap_t *__jtag_all_taps = NULL;
  * The number of TAPs in the __jtag_all_taps list, used to track the
  * assigned chain position to new TAPs
  */
-static int jtag_num_taps = 0;
+static unsigned jtag_num_taps = 0;
 
 enum reset_types jtag_reset_config = RESET_NONE;
 tap_state_t cmd_queue_end_state = TAP_RESET;
@@ -250,7 +250,7 @@ jtag_tap_t *jtag_all_taps(void)
        return __jtag_all_taps;
 };
 
-int jtag_tap_count(void)
+unsigned jtag_tap_count(void)
 {
        return jtag_num_taps;
 }
@@ -311,7 +311,7 @@ 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 */
-jtag_tap_t *jtag_tap_by_abs_position(int n)
+jtag_tap_t *jtag_tap_by_abs_position(unsigned n)
 {
        jtag_tap_t *t = jtag_all_taps();
 
index 0913c2544eef13f85f25c9dabb58bd3ea4581167..bab2731bdc618ccc0aa83f055098ecfdb0d43ee5 100644 (file)
@@ -180,9 +180,9 @@ extern const char *jtag_tap_name(const jtag_tap_t *tap);
 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 jtag_tap_t* jtag_tap_by_abs_position(unsigned abs_position);
 extern unsigned jtag_tap_count_enabled(void);
-extern int jtag_tap_count(void);
+extern unsigned jtag_tap_count(void);
 
 static __inline__ jtag_tap_t* jtag_tap_next_enabled(jtag_tap_t* p)
 {