mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fixing a number of reporter calls.
This commit is contained in:
parent
9af6c183d2
commit
a08c478079
9 changed files with 22 additions and 22 deletions
|
@ -228,14 +228,14 @@ uint32 dotted_to_addr(const char* addr_text)
|
|||
if ( sscanf(addr_text,
|
||||
"%d.%d.%d.%d", addr+0, addr+1, addr+2, addr+3) != 4 )
|
||||
{
|
||||
reporter->Error("bad dotted address:", addr_text );
|
||||
reporter->Error("bad dotted address: %s", addr_text );
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( addr[0] < 0 || addr[1] < 0 || addr[2] < 0 || addr[3] < 0 ||
|
||||
addr[0] > 255 || addr[1] > 255 || addr[2] > 255 || addr[3] > 255 )
|
||||
{
|
||||
reporter->Error("bad dotted address:", addr_text);
|
||||
reporter->Error("bad dotted address: %s", addr_text);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -252,7 +252,7 @@ uint32* dotted_to_addr6(const char* addr_text)
|
|||
uint32* addr = new uint32[4];
|
||||
if ( inet_pton(AF_INET6, addr_text, addr) <= 0 )
|
||||
{
|
||||
reporter->Error("bad IPv6 address:", addr_text );
|
||||
reporter->Error("bad IPv6 address: %s", addr_text );
|
||||
addr[0] = addr[1] = addr[2] = addr[3] = 0;
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ uint32 mask_addr(uint32 a, uint32 top_bits_to_keep)
|
|||
{
|
||||
if ( top_bits_to_keep > 32 )
|
||||
{
|
||||
reporter->Error("bad address mask value", top_bits_to_keep);
|
||||
reporter->Error("bad address mask value %s", top_bits_to_keep);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
@ -322,7 +322,7 @@ const uint32* mask_addr(const uint32* a, uint32 top_bits_to_keep)
|
|||
|
||||
if ( top_bits_to_keep == 0 || top_bits_to_keep > max_bits )
|
||||
{
|
||||
reporter->Error("bad address mask value", top_bits_to_keep);
|
||||
reporter->Error("bad address mask value %s", top_bits_to_keep);
|
||||
return addr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue