Make find_opt_by_keyword() take a const smartlist

Part of #25988

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2018-05-01 11:33:40 -04:00
parent 70c92c3366
commit 5db331e8fc
2 changed files with 2 additions and 2 deletions

View File

@ -426,7 +426,7 @@ find_by_keyword_(smartlist_t *s, directory_keyword keyword,
* NULL if no such keyword is found.
*/
directory_token_t *
find_opt_by_keyword(smartlist_t *s, directory_keyword keyword)
find_opt_by_keyword(const smartlist_t *s, directory_keyword keyword)
{
SMARTLIST_FOREACH(s, directory_token_t *, t, if (t->tp == keyword) return t);
return NULL;

View File

@ -314,7 +314,7 @@ directory_token_t *find_by_keyword_(smartlist_t *s,
#define find_by_keyword(s, keyword) \
find_by_keyword_((s), (keyword), #keyword)
directory_token_t *find_opt_by_keyword(smartlist_t *s,
directory_token_t *find_opt_by_keyword(const smartlist_t *s,
directory_keyword keyword);
smartlist_t * find_all_by_keyword(const smartlist_t *s, directory_keyword k);