mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Use bool instead of int flag in FTP analyzer's parse_eftp method
This commit is contained in:
parent
c0b09665b9
commit
517dfff529
1 changed files with 6 additions and 6 deletions
|
@ -49,7 +49,7 @@ static zeek::RecordValPtr parse_eftp(const char* line)
|
|||
int net_proto = 0; // currently not used
|
||||
zeek::IPAddr addr; // unspecified IPv6 address (all 128 bits zero)
|
||||
int port = 0;
|
||||
int good = 0;
|
||||
bool good = false;
|
||||
|
||||
if ( line )
|
||||
{
|
||||
|
@ -61,12 +61,12 @@ static zeek::RecordValPtr parse_eftp(const char* line)
|
|||
|
||||
if ( *line )
|
||||
{
|
||||
good = 1;
|
||||
good = true;
|
||||
++line; // skip delimiter
|
||||
|
||||
net_proto = strtol(line, &next_delim, 10);
|
||||
if ( *next_delim != delimiter )
|
||||
good = 0;
|
||||
good = false;
|
||||
|
||||
line = next_delim;
|
||||
if ( *line )
|
||||
|
@ -78,7 +78,7 @@ static zeek::RecordValPtr parse_eftp(const char* line)
|
|||
if ( nptr == NULL )
|
||||
{
|
||||
nptr = line + strlen(line);
|
||||
good = 0;
|
||||
good = false;
|
||||
}
|
||||
|
||||
std::string s(line, nptr-line); // extract IP address
|
||||
|
@ -95,12 +95,12 @@ static zeek::RecordValPtr parse_eftp(const char* line)
|
|||
++line; // now the port
|
||||
port = strtol(line, &next_delim, 10);
|
||||
if ( *next_delim != delimiter )
|
||||
good = 0;
|
||||
good = false;
|
||||
|
||||
if ( port < 0 || port > 65535 )
|
||||
{
|
||||
port = 0;
|
||||
good = 0;
|
||||
good = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue