From afe5748524a35320d0a95b3a957e7751fc818881 Mon Sep 17 00:00:00 2001 From: "Alan T. DeKok" Date: Mon, 30 Sep 2013 15:50:21 -0400 Subject: [PATCH] "case" can only occur within a "switch" --- src/main/modcall.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/modcall.c b/src/main/modcall.c index fedea674e9..ca958a232b 100644 --- a/src/main/modcall.c +++ b/src/main/modcall.c @@ -1882,11 +1882,8 @@ static modcallable *do_compile_modsingle(modcallable *parent, *modname = name2; - /* - * FIXME: How to tell that the parent can only - * be a "switch" statement? - */ - if (!parent) { + if (!parent || + (parent->type != MOD_SWITCH)) { cf_log_err(ci, "\"case\" statements may only appear within a \"switch\" section"); return NULL; } -- 2.47.3