mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 16:48:19 +00:00
Deprecate RecordVal::Lookup(const char*, bool)
Replace with GetField(const char*) and GetFieldOrDefault(const char*).
This commit is contained in:
parent
2b4d80c849
commit
5bf2ed02d7
14 changed files with 128 additions and 80 deletions
|
@ -32,9 +32,9 @@ Extract::~Extract()
|
|||
safe_close(fd);
|
||||
}
|
||||
|
||||
static IntrusivePtr<Val> get_extract_field_val(RecordVal* args, const char* name)
|
||||
static const IntrusivePtr<Val>& get_extract_field_val(RecordVal* args, const char* name)
|
||||
{
|
||||
auto rval = args->Lookup(name);
|
||||
const auto& rval = args->GetField(name);
|
||||
|
||||
if ( ! rval )
|
||||
reporter->Error("File extraction analyzer missing arg field: %s", name);
|
||||
|
@ -44,8 +44,8 @@ static IntrusivePtr<Val> get_extract_field_val(RecordVal* args, const char* name
|
|||
|
||||
file_analysis::Analyzer* Extract::Instantiate(RecordVal* args, File* file)
|
||||
{
|
||||
auto fname = get_extract_field_val(args, "extract_filename");
|
||||
auto limit = get_extract_field_val(args, "extract_limit");
|
||||
const auto& fname = get_extract_field_val(args, "extract_filename");
|
||||
const auto& limit = get_extract_field_val(args, "extract_limit");
|
||||
|
||||
if ( ! fname || ! limit )
|
||||
return nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue