-
Notifications
You must be signed in to change notification settings - Fork 25
Clang-format: fix clang-format errors #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -101,7 +101,7 @@ uint64_t pntoh64(const void* p) | |||||
| int shift = 56; | ||||||
|
|
||||||
| for (unsigned x = 0; x < 8; x++) { | ||||||
| buffer |= (uint64_t) * ((const uint8_t*) (p) + x) << (shift - (x * 8)); | ||||||
| buffer |= (uint64_t) *((const uint8_t*) (p) + x) << (shift - (x * 8)); | ||||||
|
||||||
| buffer |= (uint64_t) *((const uint8_t*) (p) + x) << (shift - (x * 8)); | |
| buffer |= (uint64_t)*((const uint8_t*)(p) + x) << (shift - (x * 8)); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -475,7 +475,7 @@ inline uint16_t parse_tcp_hdr(const u_char* data_ptr, uint16_t data_len, Packet* | |||||
| pkt->dst_port = ntohs(tcp->dest); | ||||||
| pkt->tcp_seq = ntohl(tcp->seq); | ||||||
| pkt->tcp_ack = ntohl(tcp->ack_seq); | ||||||
| pkt->tcp_flags = (uint8_t) * (data_ptr + 13) & 0xFF; | ||||||
| pkt->tcp_flags = (uint8_t) *(data_ptr + 13) & 0xFF; | ||||||
|
||||||
| pkt->tcp_flags = (uint8_t) *(data_ptr + 13) & 0xFF; | |
| pkt->tcp_flags = (uint8_t)(*(data_ptr + 13)) & 0xFF; |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -329,15 +329,15 @@ void DNSPlugin::process_rdata( | |||||||
| case DNS_TYPE_TXT: { | ||||||||
| DEBUG_MSG("\tData TXT:\n"); | ||||||||
|
|
||||||||
| size_t len = (uint8_t) * (data++); | ||||||||
| size_t len = (uint8_t) *(data++); | ||||||||
|
||||||||
| size_t len = (uint8_t) *(data++); | |
| size_t len = static_cast<uint8_t>(*data++); |
Copilot
AI
May 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply consistent formatting for pointer dereference following clang-format guidelines.
| len = (uint8_t) *(data++); | |
| data++; | |
| len = (uint8_t)(*data); |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -356,7 +356,7 @@ void DNSSDPlugin::process_rdata( | |||||||
| if (!(txt_all_records || matches_service(it, name))) { // all_records overrides filter | ||||||||
| break; | ||||||||
| } | ||||||||
| size_t len = (uint8_t) * (data++); | ||||||||
| size_t len = (uint8_t) *(data++); | ||||||||
|
||||||||
| size_t len = (uint8_t) *(data++); | |
| size_t len = (uint8_t)*(data++); |
Copilot
AI
May 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply consistent pointer dereference formatting to meet clang-format requirements.
| len = (uint8_t) *(data++); | |
| data++; | |
| len = (uint8_t)(*data); |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2809,7 +2809,7 @@ XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align) | |||||
| len -= 8; | ||||||
| } | ||||||
| if (len >= 4) { | ||||||
| hash ^= (xxh_u64) (XXH_get32bits(ptr)) * XXH_PRIME64_1; | ||||||
| hash ^= (xxh_u64) (XXH_get32bits(ptr)) *XXH_PRIME64_1; | ||||||
|
||||||
| hash ^= (xxh_u64) (XXH_get32bits(ptr)) *XXH_PRIME64_1; | |
| hash ^= (xxh_u64) (XXH_get32bits(ptr)) * XXH_PRIME64_1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust spacing after the cast in the macro to maintain consistency with clang-format guidelines.