Skip to content

Commit

Permalink
Quiet coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Jan 4, 2015
1 parent 486224c commit 0e42eb1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/modcall.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0e42eb1

Please sign in to comment.