mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy cppcoreguidelines-macro-usage findings (macros as constants)
This commit is contained in:
parent
d6d56d330b
commit
ad99a6821e
16 changed files with 96 additions and 80 deletions
|
@ -123,11 +123,11 @@ int icmp6_checksum(const struct icmp* icmpp, const IP_Hdr* ip, int len) {
|
|||
len);
|
||||
}
|
||||
|
||||
#define CLASS_A 0x00000000
|
||||
#define CLASS_B 0x80000000
|
||||
#define CLASS_C 0xc0000000
|
||||
#define CLASS_D 0xe0000000
|
||||
#define CLASS_E 0xf0000000
|
||||
constexpr uint32_t CLASS_A = 0x00000000;
|
||||
constexpr uint32_t CLASS_B = 0x80000000;
|
||||
constexpr uint32_t CLASS_C = 0xc0000000;
|
||||
constexpr uint32_t CLASS_D = 0xe0000000;
|
||||
constexpr uint32_t CLASS_E = 0xf0000000;
|
||||
|
||||
#define CHECK_CLASS(addr, class) (((addr) & (class)) == (class))
|
||||
char addr_to_class(uint32_t addr) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue