diff --git a/src/Dict.h b/src/Dict.h index b53c7e6c99..3d82b5418f 100644 --- a/src/Dict.h +++ b/src/Dict.h @@ -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. diff --git a/src/IP.h b/src/IP.h index 5527fee3e8..4364676518 100644 --- a/src/IP.h +++ b/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 diff --git a/src/strings.bif b/src/strings.bif index b212ec782b..53c5a94c65 100644 --- a/src/strings.bif +++ b/src/strings.bif @@ -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;