diff options
author | Mike Perry <mikeperry-git@torproject.org> | 2018-08-29 17:10:06 +0000 |
---|---|---|
committer | Mike Perry <mikeperry-git@torproject.org> | 2018-08-29 17:10:06 +0000 |
commit | 93ff8b411a2ac8eb6c3b58d90e2476d3e0a372ec (patch) | |
tree | e4b73afb2983d0125d30d015169dab217c5d1398 /src/lib/container | |
parent | 810152b20f6d773172e1f28ab72a1d4b2fda2d82 (diff) | |
parent | ce894e20b597d2d21b56ac8a8f13d1ea4063731d (diff) | |
download | tor-93ff8b411a2ac8eb6c3b58d90e2476d3e0a372ec.tar.gz tor-93ff8b411a2ac8eb6c3b58d90e2476d3e0a372ec.zip |
Merge branch 'ticket25573-034' into ticket25573-master
Diffstat (limited to 'src/lib/container')
-rw-r--r-- | src/lib/container/smartlist.c | 2 | ||||
-rw-r--r-- | src/lib/container/smartlist.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/container/smartlist.c b/src/lib/container/smartlist.c index 4b29d834d9..64cabfcc6f 100644 --- a/src/lib/container/smartlist.c +++ b/src/lib/container/smartlist.c @@ -408,7 +408,7 @@ smartlist_uniq(smartlist_t *sl, * less than member, and greater than 0 if key is greater then member. */ void * -smartlist_bsearch(smartlist_t *sl, const void *key, +smartlist_bsearch(const smartlist_t *sl, const void *key, int (*compare)(const void *key, const void **member)) { int found, idx; diff --git a/src/lib/container/smartlist.h b/src/lib/container/smartlist.h index 9705396ac9..0f5af3a923 100644 --- a/src/lib/container/smartlist.h +++ b/src/lib/container/smartlist.h @@ -64,7 +64,7 @@ const uint8_t *smartlist_get_most_frequent_digest256(smartlist_t *sl); void smartlist_uniq_strings(smartlist_t *sl); void smartlist_uniq_digests(smartlist_t *sl); void smartlist_uniq_digests256(smartlist_t *sl); -void *smartlist_bsearch(smartlist_t *sl, const void *key, +void *smartlist_bsearch(const smartlist_t *sl, const void *key, int (*compare)(const void *key, const void **member)); int smartlist_bsearch_idx(const smartlist_t *sl, const void *key, int (*compare)(const void *key, const void **member), |