]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Quiet coverity
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 4 Jan 2015 00:43:43 +0000 (19:43 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Sun, 4 Jan 2015 00:43:50 +0000 (19:43 -0500)
src/main/modcall.c

index 00593c6adf6e38d005550d5b7e52b5c956f76e2d..62882fcdfa1bd61090511dfbd1e17571efe3ecd3 100644 (file)
@@ -2051,7 +2051,13 @@ static modcallable *do_compile_modforeach(modcallable *parent,
                return NULL;
        }
 
-       if (vpt && (vpt->type != TMPL_TYPE_ATTR) && (vpt->type != TMPL_TYPE_LIST)) {
+       /*
+        *      If we don't have a negative return code, we must have a vpt
+        *      (mostly to quiet coverity).
+        */
+       rad_assert(vpt);
+
+       if ((vpt->type != TMPL_TYPE_ATTR) && (vpt->type != TMPL_TYPE_LIST)) {
                cf_log_err_cs(cs, "MUST use attribute or list reference in 'foreach'");
                return NULL;
        }