mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
spicy: Drop ZEEK_VERSION_NUMBER ifdef'ery
Given src/spicy is part of the Zeek tree, these are not necessary and are probably just remains from the spicy-plugin era.
This commit is contained in:
parent
08bf8d47f4
commit
5742f7cc21
2 changed files with 0 additions and 16 deletions
|
@ -87,11 +87,7 @@ bool FileAnalyzer::Process(int len, const u_char* data) {
|
|||
file->FileEvent(Spicy::max_file_depth_exceeded, {file_val, analyzer_args, val_mgr->Count(_state.file().depth)});
|
||||
|
||||
auto tag = spicy_mgr->tagForFileAnalyzer(_state.file().analyzer->Tag());
|
||||
#if ZEEK_VERSION_NUMBER >= 50200
|
||||
AnalyzerViolation("maximal file depth exceeded", reinterpret_cast<const char*>(data), len, tag);
|
||||
#else
|
||||
// We don't have an an appropriate way to report this with older Zeeks.
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -101,11 +97,7 @@ bool FileAnalyzer::Process(int len, const u_char* data) {
|
|||
} catch ( const hilti::rt::RuntimeError& e ) {
|
||||
STATE_DEBUG_MSG(hilti::rt::fmt("error during parsing, triggering analyzer violation: %s", e.what()));
|
||||
auto tag = spicy_mgr->tagForFileAnalyzer(_state.file().analyzer->Tag());
|
||||
#if ZEEK_VERSION_NUMBER >= 50200
|
||||
AnalyzerViolation(e.what(), reinterpret_cast<const char*>(data), len, tag);
|
||||
#else
|
||||
// We don't have an an appropriate way to report this with older Zeeks.
|
||||
#endif
|
||||
} catch ( const hilti::rt::Exception& e ) {
|
||||
STATE_DEBUG_MSG(e.what());
|
||||
spicy_mgr->analyzerError(_state.file().analyzer, e.description(),
|
||||
|
@ -122,11 +114,7 @@ void FileAnalyzer::Finish() {
|
|||
} catch ( const hilti::rt::RuntimeError& e ) {
|
||||
STATE_DEBUG_MSG(hilti::rt::fmt("error during parsing, triggering analyzer violation: %s", e.what()));
|
||||
auto tag = spicy_mgr->tagForFileAnalyzer(_state.file().analyzer->Tag());
|
||||
#if ZEEK_VERSION_NUMBER >= 50200
|
||||
AnalyzerViolation(e.what(), "", 0, tag);
|
||||
#else
|
||||
// We don't have an an appropriate way to report this with older Zeeks.
|
||||
#endif
|
||||
} catch ( const hilti::rt::Exception& e ) {
|
||||
spicy_mgr->analyzerError(_state.file().analyzer, e.description(),
|
||||
e.location()); // this sets Zeek to skip sending any further input
|
||||
|
|
|
@ -772,11 +772,7 @@ inline void set_record_field(RecordVal* rval, const IntrusivePtr<RecordType>& rt
|
|||
if constexpr ( NoConversionNeeded::value )
|
||||
rval->Assign(idx, x);
|
||||
else if constexpr ( IsSignedInteger::value )
|
||||
#if ZEEK_VERSION_NUMBER >= 50200
|
||||
rval->Assign(idx, static_cast<int64_t>(x.Ref()));
|
||||
#else
|
||||
rval->Assign(idx, static_cast<int>(x.Ref()));
|
||||
#endif
|
||||
else if constexpr ( IsUnsignedInteger::value )
|
||||
rval->Assign(idx, static_cast<uint64_t>(x.Ref()));
|
||||
else if constexpr ( std::is_same_v<T, hilti::rt::Bytes> )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue