Remove trailing whitespace from script files

This commit is contained in:
Tim Wojtulewicz 2021-10-20 09:55:11 -07:00
parent 303e84ad86
commit a6378531db
78 changed files with 310 additions and 325 deletions

View file

@ -3,16 +3,16 @@
module GLOBAL;
export {
## Takes a conn_id record and returns a string representation with the
## Takes a conn_id record and returns a string representation with the
## general data flow appearing to be from the connection originator
## on the left to the responder on the right.
global id_string: function(id: conn_id): string;
## Takes a conn_id record and returns a string representation with the
## Takes a conn_id record and returns a string representation with the
## general data flow appearing to be from the connection responder
## on the right to the originator on the left.
global reverse_id_string: function(id: conn_id): string;
## Calls :zeek:id:`id_string` or :zeek:id:`reverse_id_string` if the
## second argument is T or F, respectively.
global directed_id_string: function(id: conn_id, is_orig: bool): string;

View file

@ -58,7 +58,7 @@ type Host: enum {
function addr_matches_host(ip: addr, h: Host): bool
{
if ( h == NO_HOSTS ) return F;
return ( h == ALL_HOSTS ||
(h == LOCAL_HOSTS && Site::is_local_addr(ip)) ||
(h == REMOTE_HOSTS && !Site::is_local_addr(ip)) );

View file

@ -1,8 +1,7 @@
## Extract an integer from a string.
##
##
## s: The string to search for a number.
##
##
## get_first: Provide `F` if you would like the last number found.
##
## Returns: The request integer from the given string or 0 if

View file

@ -27,7 +27,7 @@ function set_to_regex(ss: set[string], pat: string): pattern
for ( s in ss )
{
local tmp_pattern = convert_for_pattern(s);
return_pat = ( i == 0 ) ?
return_pat = ( i == 0 ) ?
tmp_pattern : cat(tmp_pattern, "|", return_pat);
++i;
}

View file

@ -25,7 +25,7 @@ function join_string_set(ss: set[string], j: string): string
{
if ( i > 0 )
output = cat(output, j);
output = cat(output, s);
++i;
}

View file

@ -16,13 +16,13 @@ export {
## for.
index: count &default=0;
};
## The thresholds you would like to use as defaults with the
## The thresholds you would like to use as defaults with the
## :zeek:id:`default_check_threshold` function.
const default_notice_thresholds: vector of count = {
30, 100, 1000, 10000, 100000, 1000000, 10000000,
} &redef;
## This will check if a :zeek:type:`TrackCount` variable has crossed any
## thresholds in a given set.
##
@ -33,7 +33,7 @@ export {
##
## Returns: T if a threshold has been crossed, else F.
global check_threshold: function(v: vector of count, tracker: TrackCount): bool;
## This will use the :zeek:id:`default_notice_thresholds` variable to
## check a :zeek:type:`TrackCount` variable to see if it has crossed
## another threshold.