mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Rework setting adding ports to map slightly
This commit is contained in:
parent
11be8888d7
commit
bd52ab1a55
1 changed files with 3 additions and 4 deletions
|
@ -3972,10 +3972,9 @@ const PortValPtr& ValManager::Port(uint32_t port_num, TransportProto port_type)
|
|||
port_num = 0;
|
||||
}
|
||||
|
||||
uint32_t port_masked = PortVal::Mask(port_num, port_type);
|
||||
if ( ports.find(port_masked) == ports.end() )
|
||||
ports[port_masked] = IntrusivePtr{AdoptRef{},
|
||||
new PortVal(PortVal::Mask(port_num, port_type))};
|
||||
auto port_masked = PortVal::Mask(port_num, port_type);
|
||||
if ( ports.count(port_masked) == 0 )
|
||||
ports.insert({port_masked, make_intrusive<PortVal>(port_masked)});
|
||||
|
||||
return ports[port_masked];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue