commit 5db331e8fccd1bf365b8e300f940eb1dd85072f9 Author: David Goulet dgoulet@torproject.org Date: Tue May 1 11:33:40 2018 -0400
Make find_opt_by_keyword() take a const smartlist
Part of #25988
Signed-off-by: David Goulet dgoulet@torproject.org --- src/or/parsecommon.c | 2 +- src/or/parsecommon.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/or/parsecommon.c b/src/or/parsecommon.c index 6c3dd3100..9bd00e17c 100644 --- a/src/or/parsecommon.c +++ b/src/or/parsecommon.c @@ -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; diff --git a/src/or/parsecommon.h b/src/or/parsecommon.h index 903d94478..d33faf8ec 100644 --- a/src/or/parsecommon.h +++ b/src/or/parsecommon.h @@ -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);
tor-commits@lists.torproject.org