diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-07-22 15:01:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-07-24 15:21:56 -0400 |
commit | 7e91d4f57298fc08e4aad8ca90ecfad7cf9de206 (patch) | |
tree | 7741a023586fc9c777214581cb605ea9e8a39eaf /src/app/config/confparse.c | |
parent | 769fe817174d238c2c4a615872d6df9a0379dfc6 (diff) | |
download | tor-7e91d4f57298fc08e4aad8ca90ecfad7cf9de206.tar.gz tor-7e91d4f57298fc08e4aad8ca90ecfad7cf9de206.zip |
Replace config_find_option with a variant that exposes less
Diffstat (limited to 'src/app/config/confparse.c')
-rw-r--r-- | src/app/config/confparse.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/app/config/confparse.c b/src/app/config/confparse.c index 0964321ad0..16fb6dbc58 100644 --- a/src/app/config/confparse.c +++ b/src/app/config/confparse.c @@ -288,17 +288,17 @@ config_mgr_find_var(const config_mgr_t *mgr, return NULL; } -/** If <b>key</b> is a configuration option, return the corresponding const - * config_var_t. Otherwise, if <b>key</b> is a non-standard abbreviation, - * warn, and return the corresponding const config_var_t. Otherwise return - * NULL. +/** + * If <b>key</b> is a name or an abbreviation configuration option, return + * the corresponding canonical name for it. Warn if the abbreviation is + * non-standard. Return NULL if the option does not exist. */ -const config_var_t * -config_find_option(const config_mgr_t *mgr, const char *key) +const char * +config_find_option_name(const config_mgr_t *mgr, const char *key) { const managed_var_t *mv = config_mgr_find_var(mgr, key, true, NULL); if (mv) - return mv->cvar; + return mv->cvar->member.name; else return NULL; } |