diff --git a/scripts/base/frameworks/cluster/setup-connections.zeek b/scripts/base/frameworks/cluster/setup-connections.zeek index 9e9374c8b9..2abd57b142 100644 --- a/scripts/base/frameworks/cluster/setup-connections.zeek +++ b/scripts/base/frameworks/cluster/setup-connections.zeek @@ -28,7 +28,6 @@ function connect_peer(node_type: NodeType, node_name: string) function connect_peers_with_type(node_type: NodeType) { - local rval: vector of NamedNode = vector(); local nn = nodes_with_type(node_type); for ( i in nn ) diff --git a/scripts/base/frameworks/netcontrol/main.zeek b/scripts/base/frameworks/netcontrol/main.zeek index f22d1eb06c..872128a8e0 100644 --- a/scripts/base/frameworks/netcontrol/main.zeek +++ b/scripts/base/frameworks/netcontrol/main.zeek @@ -731,7 +731,7 @@ function find_rules_subnet(sn: subnet) : vector of Rule { local sn_entry = matches[m]; local rule_ids = rules_by_subnets[sn_entry]; - for ( rule_id in rules_by_subnets[sn_entry] ) + for ( rule_id in rule_ids ) { if ( rule_id in rules ) ret += rules[rule_id]; diff --git a/scripts/base/frameworks/netcontrol/plugins/openflow.zeek b/scripts/base/frameworks/netcontrol/plugins/openflow.zeek index d80d7c4a41..d22e5f3125 100644 --- a/scripts/base/frameworks/netcontrol/plugins/openflow.zeek +++ b/scripts/base/frameworks/netcontrol/plugins/openflow.zeek @@ -195,7 +195,7 @@ function entity_to_match(p: PluginState, e: Entity): vector of OpenFlow::ofp_mat return openflow_match_pred(p, e, v); } - local proto = OpenFlow::IP_TCP; + # local proto = OpenFlow::IP_TCP; if ( e$ty == FLOW ) { diff --git a/scripts/base/protocols/smtp/main.zeek b/scripts/base/protocols/smtp/main.zeek index 0d9b4e97ab..7ee4a6cee5 100644 --- a/scripts/base/protocols/smtp/main.zeek +++ b/scripts/base/protocols/smtp/main.zeek @@ -336,5 +336,6 @@ function describe(rec: Info): string (|rec$rcptto|>1 ? fmt(" (plus %d others)", |rec$rcptto|-1) : ""), (abbrev_subject != "" ? fmt(": %s", abbrev_subject) : "")); } - return ""; + + return ""; } diff --git a/scripts/base/utils/addrs.zeek b/scripts/base/utils/addrs.zeek index a4a4ef98e2..c2d8779fe6 100644 --- a/scripts/base/utils/addrs.zeek +++ b/scripts/base/utils/addrs.zeek @@ -70,11 +70,10 @@ const ip_addr_regex = ipv4_addr_regex | ipv6_addr_regex; ## Returns: T if every element is between 0 and 255, inclusive, else F. function has_valid_octets(octets: string_vec): bool { - local num = 0; for ( i in octets ) { - num = to_count(octets[i]); - if ( num < 0 || 255 < num ) + local num = to_count(octets[i]); + if ( 255 < num ) return F; } return T;