diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-12 09:38:52 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-12 09:38:52 -0400 |
commit | 19dbc385d540df70b5e9a6193248080a298577c3 (patch) | |
tree | 02f41bbd6a51d41f4fb6ea4c459cd6e182e5ec61 /src/lib | |
parent | 62743912bcbacc1bd918b60a80f3394647d2ef91 (diff) | |
parent | 7685c39f9d3aba9afb3972a02bf51b1ad46f8b69 (diff) | |
download | tor-19dbc385d540df70b5e9a6193248080a298577c3.tar.gz tor-19dbc385d540df70b5e9a6193248080a298577c3.zip |
Merge remote-tracking branch 'tor-github/pr/298'
Diffstat (limited to 'src/lib')
-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), |