mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix clang-tidy bugprone-branch-clone warnings in headers
This commit is contained in:
parent
694e53e47b
commit
b27eba6533
3 changed files with 5 additions and 5 deletions
|
@ -628,7 +628,7 @@ public:
|
|||
if ( max_entries < num_entries )
|
||||
max_entries = num_entries;
|
||||
if ( num_entries > ThresholdEntries() )
|
||||
SizeUp();
|
||||
SizeUp(); // NOLINT(bugprone-branch-clone)
|
||||
|
||||
// if space_distance is too great, performance decreases. we need to sizeup for
|
||||
// performance.
|
||||
|
|
2
src/IP.h
2
src/IP.h
|
@ -366,7 +366,7 @@ public:
|
|||
*/
|
||||
const ip6_mobility* MobilityHeader() const {
|
||||
if ( ip4 )
|
||||
return nullptr;
|
||||
return nullptr; // NOLINT(bugprone-branch-clone)
|
||||
else if ( (*ip6_hdrs)[ip6_hdrs->Size() - 1]->Type() != IPPROTO_MOBILITY )
|
||||
return nullptr;
|
||||
else
|
||||
|
|
|
@ -1166,8 +1166,8 @@ function hexdump%(data_str: string%) : string
|
|||
#define HEX_LINE_RIGHT_MIDDLE 31
|
||||
#define HEX_BLOCK_LEN 23
|
||||
#define HEX_LINE_BYTES 16
|
||||
#define NULL_CHAR '.'
|
||||
#define NONPRINT_CHAR '.'
|
||||
constexpr char NULL_CHAR = '.';
|
||||
constexpr char NONPRINT_CHAR = '.';
|
||||
|
||||
const u_char* data = data_str->Bytes();
|
||||
unsigned data_size = data_str->Len();
|
||||
|
@ -1211,7 +1211,7 @@ function hexdump%(data_str: string%) : string
|
|||
// If unprintable, use special characters:
|
||||
if ( val < 0x20 || val >= 0x7f )
|
||||
{
|
||||
if ( val == 0 )
|
||||
if ( val == 0x00 )
|
||||
ascii_byte = NULL_CHAR;
|
||||
else
|
||||
ascii_byte = NONPRINT_CHAR;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue