summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main/config.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/config.c b/main/config.c
index f5fa9cd91..3aab0f8a5 100644
--- a/main/config.c
+++ b/main/config.c
@@ -420,10 +420,13 @@ const char *ast_variable_retrieve(const struct ast_config *config, const char *c
} else {
struct ast_category *cat;
- for (cat = config->root; cat; cat = cat->next)
- for (v = cat->root; v; v = v->next)
- if (!strcasecmp(variable, v->name))
+ for (cat = config->root; cat; cat = cat->next) {
+ for (v = cat->root; v; v = v->next) {
+ if (!strcasecmp(variable, v->name)) {
return v->value;
+ }
+ }
+ }
}
return NULL;