diff --git a/scripts/base/frameworks/logging/main.zeek b/scripts/base/frameworks/logging/main.zeek index 48b29cf22e..fdaa764db8 100644 --- a/scripts/base/frameworks/logging/main.zeek +++ b/scripts/base/frameworks/logging/main.zeek @@ -713,6 +713,8 @@ function enable_stream(id: ID) : bool if ( id in all_streams ) active_streams[id] = all_streams[id]; + + return T; } # convenience function to add a filter name to stream_filters diff --git a/scripts/base/protocols/conn/thresholds.zeek b/scripts/base/protocols/conn/thresholds.zeek index c47f218d88..a127a883ee 100644 --- a/scripts/base/protocols/conn/thresholds.zeek +++ b/scripts/base/protocols/conn/thresholds.zeek @@ -217,7 +217,7 @@ function set_current_threshold(c: connection, ttype: threshold_type, is_orig: bo return set_current_conn_packets_threshold(c$id, t, T); else if ( ttype == PACKETS && ! is_orig ) return set_current_conn_packets_threshold(c$id, t, F); - else if ( ttype == DURATION ) + else # ttype == DURATION return set_current_conn_duration_threshold(c$id, td); } diff --git a/scripts/base/utils/directions-and-hosts.zeek b/scripts/base/utils/directions-and-hosts.zeek index dab35411a6..442b4d8454 100644 --- a/scripts/base/utils/directions-and-hosts.zeek +++ b/scripts/base/utils/directions-and-hosts.zeek @@ -33,7 +33,7 @@ function id_matches_direction(id: conn_id, d: Direction): bool return (o_local && !r_local) || (!o_local && r_local); else if ( d == OUTBOUND ) return o_local && !r_local; - else if ( d == INBOUND ) + else # d == INBOUND return !o_local && r_local; } diff --git a/src/zeek.bif b/src/zeek.bif index eb936c8a08..f125e72ce8 100644 --- a/src/zeek.bif +++ b/src/zeek.bif @@ -68,6 +68,10 @@ static int check_fmt_type(zeek::TypeTag t, zeek::TypeTag ok[]) static void do_fmt(const char*& fmt, zeek::Val* v, zeek::ODesc* d) { + if ( ! v ) + // Help with error propagation in compiled code. + return; + zeek::TypeTag t = v->GetType()->Tag(); zeek::InternalTypeTag it = v->GetType()->InternalType();