From ffb93214968691a5b3a9df29e7b12100827e8607 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sat, 2 Feb 2008 15:59:32 +0200 Subject: [PATCH] config: Explain why get_opt_rec() does not follow OPT_ALIAS. (cherry picked from commit 4960c65f2072fb0012738a6c28b754815cf8ff1c) --- src/config/options.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/config/options.c b/src/config/options.c index 4996a4ff..b797d437 100644 --- a/src/config/options.c +++ b/src/config/options.c @@ -157,7 +157,14 @@ debug_check_option_syntax(struct option *option) /* Ugly kludge */ static int no_autocreate = 0; -/* Get record of option of given name, or NULL if there's no such option. */ +/** Get record of option of given name, or NULL if there's no such option. + * + * If the specified option is an ::OPT_ALIAS, this function returns the + * alias, rather than the option to which the alias refers. It must + * work this way because the alias may have the ::OPT_ALIAS_NEGATE flag. + * Instead, if the caller tries to read or set the value of the alias, + * the functions associated with ::OPT_ALIAS will forward the operation + * to the underlying option. */ struct option * get_opt_rec(struct option *tree, unsigned char *name_) {