Address coverity errors.

This commit is contained in:
Johanna Amann 2016-08-16 10:40:15 -07:00
parent e3e3fdfb9d
commit 5d8da0b182
4 changed files with 203 additions and 3 deletions

View file

@ -597,7 +597,7 @@ bool Manager::AddFilter(EnumVal* id, RecordVal* fval)
filter->num_ext_fields = 0;
if ( filter->ext_func )
{
if ( filter->ext_func->FType()->YieldType()->Tag() == TYPE_RECORD )
if ( filter->ext_func->FType()->YieldType()->Tag() == TYPE_RECORD )
{
filter->num_ext_fields = filter->ext_func->FType()->YieldType()->AsRecordType()->NumFields();
}
@ -609,6 +609,7 @@ bool Manager::AddFilter(EnumVal* id, RecordVal* fval)
else
{
reporter->Error("Return value of log_ext is not a record (got %s)", type_name(filter->ext_func->FType()->YieldType()->Tag()));
delete filter;
return false;
}
}