Changeset 10207 for trunk/libtransmission/ptrarray.c
- Timestamp:
- Feb 15, 2010, 4:15:37 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/ptrarray.c
r10030 r10207 110 110 assert( begin >= 0 ); 111 111 if( end < 0 ) end = t->n_items; 112 assert( end - begin > 0);112 assert( begin < end ); 113 113 assert( end <= t->n_items ); 114 114 … … 129 129 int compare( const void *, 130 130 const void * ), 131 int *exact_match )131 tr_bool * exact_match ) 132 132 { 133 133 int len = t->n_items; … … 147 147 { 148 148 if( exact_match ) 149 *exact_match = 1;149 *exact_match = TRUE; 150 150 return middle; 151 151 break; … … 158 158 159 159 if( exact_match ) 160 *exact_match = 0;160 *exact_match = FALSE; 161 161 162 162 return first; … … 168 168 static void 169 169 assertSortedAndUnique( const tr_ptrArray * t, 170 170 int compare(const void*, const void*) ) 171 171 { 172 172 int i; … … 180 180 tr_ptrArrayInsertSorted( tr_ptrArray * t, 181 181 void * ptr, 182 intcompare(const void*, const void*) )182 int compare(const void*, const void*) ) 183 183 { 184 184 const int pos = tr_ptrArrayLowerBound( t, ptr, compare, NULL ); … … 192 192 tr_ptrArrayFindSorted( tr_ptrArray * t, 193 193 const void * ptr, 194 intcompare(const void*, const void*) )195 { 196 intmatch;194 int compare(const void*, const void*) ) 195 { 196 tr_bool match; 197 197 const int pos = tr_ptrArrayLowerBound( t, ptr, compare, &match ); 198 198 … … 202 202 void* 203 203 tr_ptrArrayRemoveSorted( tr_ptrArray * t, 204 const void *ptr,205 intcompare(const void*, const void*) )204 const void * ptr, 205 int compare(const void*, const void*) ) 206 206 { 207 207 void * ret = NULL; 208 intmatch;208 tr_bool match; 209 209 const int pos = tr_ptrArrayLowerBound( t, ptr, compare, &match ); 210 210
Note: See TracChangeset
for help on using the changeset viewer.