From: Simon Ruderich Date: Mon, 10 Jun 2019 20:48:39 +0000 (+0200) Subject: nss: search: make search_key argument const X-Git-Tag: 0.1~73 X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=bfa9e0160a19bd7c151720de78749aa817d5986f;p=nsscash%2Fnsscash.git nss: search: make search_key argument const --- diff --git a/nss/search.c b/nss/search.c index d4f7106..256001f 100644 --- a/nss/search.c +++ b/nss/search.c @@ -50,6 +50,6 @@ static int bsearch_callback(const void *x, const void *y) { } } -uint64_t *search(struct search_key *key, const void *index, uint64_t count) { +uint64_t *search(const struct search_key *key, const void *index, uint64_t count) { return bsearch(key, index, count, sizeof(uint64_t), bsearch_callback); } diff --git a/nss/search.h b/nss/search.h index 9012b49..5a1b52e 100644 --- a/nss/search.h +++ b/nss/search.h @@ -31,6 +31,6 @@ struct search_key { uint64_t offset; }; -uint64_t *search(struct search_key *key, const void *index, uint64_t count) __attribute__((visibility("hidden"))); +uint64_t *search(const struct search_key *key, const void *index, uint64_t count) __attribute__((visibility("hidden"))); #endif