diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-09-16 09:40:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-09-16 09:40:38 -0400 |
commit | ea72b4f60a6a224b0da53c4c95b5dbf2c4d4cd57 (patch) | |
tree | 57365a55d66567bd2cd309cc89a9855febc99e56 /src/test/test_containers.c | |
parent | a6627fdb80935d68b8e7f1c4e098f8ce54894842 (diff) | |
download | tor-ea72b4f60a6a224b0da53c4c95b5dbf2c4d4cd57.tar.gz tor-ea72b4f60a6a224b0da53c4c95b5dbf2c4d4cd57.zip |
clean up eol whitespace from coccinelle-generated patches
Diffstat (limited to 'src/test/test_containers.c')
-rw-r--r-- | src/test/test_containers.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/test/test_containers.c b/src/test/test_containers.c index 21811b9776..24211dd580 100644 --- a/src/test/test_containers.c +++ b/src/test/test_containers.c @@ -29,7 +29,7 @@ compare_strs_for_bsearch_(const void *a, const void **b) /** Helper: return a tristate based on comparing the strings in *<b>a</b> and * *<b>b</b>, excluding a's first character, and ignoring case. */ static int -compare_without_first_ch_(const void *a, const void **b) +cmp_without_first_(const void *a, const void **b) { const char *s1 = a, *s2 = *b; return strcasecmp(s1+1, s2); @@ -225,26 +225,27 @@ test_container_smartlist_strings(void *arg) /* Test bsearch. */ smartlist_sort(sl, compare_strs_); tt_str_op("nickm",==, smartlist_bsearch(sl, "zNicKM", - compare_without_first_ch_)); - tt_str_op("and",==, smartlist_bsearch(sl, " AND", compare_without_first_ch_)); - tt_ptr_op(NULL,==, smartlist_bsearch(sl, " ANz", compare_without_first_ch_)); + cmp_without_first_)); + tt_str_op("and",==, + smartlist_bsearch(sl, " AND", cmp_without_first_)); + tt_ptr_op(NULL,==, smartlist_bsearch(sl, " ANz", cmp_without_first_)); /* Test bsearch_idx */ { int f; smartlist_t *tmp = NULL; - tt_int_op(0,==, smartlist_bsearch_idx(sl," aaa",compare_without_first_ch_,&f)); + tt_int_op(0,==,smartlist_bsearch_idx(sl," aaa",cmp_without_first_,&f)); tt_int_op(f,==, 0); - tt_int_op(0,==, smartlist_bsearch_idx(sl," and",compare_without_first_ch_,&f)); + tt_int_op(0,==, smartlist_bsearch_idx(sl," and",cmp_without_first_,&f)); tt_int_op(f,==, 1); - tt_int_op(1,==, smartlist_bsearch_idx(sl," arm",compare_without_first_ch_,&f)); + tt_int_op(1,==, smartlist_bsearch_idx(sl," arm",cmp_without_first_,&f)); tt_int_op(f,==, 0); - tt_int_op(1,==, smartlist_bsearch_idx(sl," arma",compare_without_first_ch_,&f)); + tt_int_op(1,==, smartlist_bsearch_idx(sl," arma",cmp_without_first_,&f)); tt_int_op(f,==, 1); - tt_int_op(2,==, smartlist_bsearch_idx(sl," armb",compare_without_first_ch_,&f)); + tt_int_op(2,==, smartlist_bsearch_idx(sl," armb",cmp_without_first_,&f)); tt_int_op(f,==, 0); - tt_int_op(7,==, smartlist_bsearch_idx(sl," zzzz",compare_without_first_ch_,&f)); + tt_int_op(7,==, smartlist_bsearch_idx(sl," zzzz",cmp_without_first_,&f)); tt_int_op(f,==, 0); /* Test trivial cases for list of length 0 or 1 */ |