]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
TMPL_TYPE_UNRESOLVED should never occur
authorAlan T. DeKok <aland@freeradius.org>
Sun, 3 Jan 2021 14:24:43 +0000 (09:24 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Sun, 3 Jan 2021 14:24:43 +0000 (09:24 -0500)
src/lib/server/cond_eval.c

index 8eeb8641ab4b247069a5824a85235e69025432c2..813189b363125d96731f4ed48dfa079dcce2c490 100644 (file)
@@ -134,15 +134,6 @@ void cond_debug(fr_cond_t const *cond)
 int cond_eval_tmpl(request_t *request, UNUSED int depth, tmpl_t const *vpt)
 {
        switch (vpt->type) {
-       case TMPL_TYPE_UNRESOLVED:
-               /*
-                *      Empty string is false, non-empty string
-                *      is true.
-                *
-                *      @todo: Maybe also check for digits?
-                */
-               return (*vpt->data.unescaped != '\0');
-
        case TMPL_TYPE_ATTR:
        case TMPL_TYPE_LIST:
                if (tmpl_find_vp(NULL, request, vpt) == 0) {
@@ -170,6 +161,7 @@ int cond_eval_tmpl(request_t *request, UNUSED int depth, tmpl_t const *vpt)
        /*
         *      Can't have a bare ... (/foo/) ...
         */
+       case TMPL_TYPE_UNRESOLVED:
        case TMPL_TYPE_REGEX:
        case TMPL_TYPE_REGEX_UNCOMPILED:
        case TMPL_TYPE_REGEX_XLAT: