mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Migrate table-based for-loops to key-value iteration
This commit is contained in:
parent
41c7b229d3
commit
01d303b480
36 changed files with 150 additions and 153 deletions
|
@ -38,11 +38,10 @@ function describe_file(f: fa_file): string
|
|||
if ( f$source != "SMB" )
|
||||
return "";
|
||||
|
||||
for ( cid in f$conns )
|
||||
for ( cid, c in f$conns )
|
||||
{
|
||||
local info = f$conns[cid];
|
||||
if ( info?$smb_state && info$smb_state?$current_file && info$smb_state$current_file?$name )
|
||||
return info$smb_state$current_file$name;
|
||||
if ( c?$smb_state && c$smb_state?$current_file && c$smb_state$current_file?$name )
|
||||
return c$smb_state$current_file$name;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue