From 4960c65f2072fb0012738a6c28b754815cf8ff1c 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. --- 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 025c9def..313e3c7f 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, const unsigned char *name_) {