mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
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:
parent
70c92c3366
commit
5db331e8fc
@ -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;
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user