Skip to content

Commit 4f21aa8

Browse files
authored
Merge pull request #318 from CESNET/clang-format-fix
clang-format: fix new clang-format errors
2 parents 96dee23 + cae8f19 commit 4f21aa8

File tree

2 files changed

+29
-27
lines changed

2 files changed

+29
-27
lines changed

src/plugins/input/parser/parser.cpp

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,31 @@ inline uint16_t parse_eth_hdr(const u_char* data_ptr, uint16_t data_len, Packet*
7979
DEBUG_MSG("\tDest mac:\t%s\n", ether_ntoa((struct ether_addr*) eth->h_dest));
8080
DEBUG_MSG("\tSrc mac:\t%s\n", ether_ntoa((struct ether_addr*) eth->h_source));
8181
#else
82-
DEBUG_CODE(char src_mac[18]; // ether_ntoa missing on some platforms
83-
char dst_mac[18];
84-
uint8_t* p = (uint8_t*) eth->h_source;
85-
snprintf(
86-
src_mac,
87-
sizeof(src_mac),
88-
"%02x:%02x:%02x:%02x:%02x:%02x",
89-
p[0],
90-
p[1],
91-
p[2],
92-
p[3],
93-
p[4],
94-
p[5]);
95-
p = (uint8_t*) eth->h_dest;
96-
snprintf(
97-
dst_mac,
98-
sizeof(dst_mac),
99-
"%02x:%02x:%02x:%02x:%02x:%02x",
100-
p[0],
101-
p[1],
102-
p[2],
103-
p[3],
104-
p[4],
105-
p[5]););
82+
DEBUG_CODE(
83+
char src_mac[18]; // ether_ntoa missing on some platforms
84+
char dst_mac[18];
85+
uint8_t* p = (uint8_t*) eth->h_source;
86+
snprintf(
87+
src_mac,
88+
sizeof(src_mac),
89+
"%02x:%02x:%02x:%02x:%02x:%02x",
90+
p[0],
91+
p[1],
92+
p[2],
93+
p[3],
94+
p[4],
95+
p[5]);
96+
p = (uint8_t*) eth->h_dest;
97+
snprintf(
98+
dst_mac,
99+
sizeof(dst_mac),
100+
"%02x:%02x:%02x:%02x:%02x:%02x",
101+
p[0],
102+
p[1],
103+
p[2],
104+
p[3],
105+
p[4],
106+
p[5]););
106107
DEBUG_MSG("\tDest mac:\t%s\n", dst_mac);
107108
DEBUG_MSG("\tSrc mac:\t%s\n", src_mac);
108109
#endif
@@ -684,8 +685,9 @@ void parse_packet(
684685
uint16_t data_offset = 0;
685686

686687
DEBUG_MSG("---------- packet parser #%u -------------\n", ++s_total_pkts);
687-
DEBUG_CODE(char timestamp[32]; time_t time = ts.tv_sec;
688-
strftime(timestamp, sizeof(timestamp), "%FT%T", localtime(&time)););
688+
DEBUG_CODE(
689+
char timestamp[32]; time_t time = ts.tv_sec;
690+
strftime(timestamp, sizeof(timestamp), "%FT%T", localtime(&time)););
689691
DEBUG_MSG("Time:\t\t\t%s.%06lu\n", timestamp, ts.tv_usec);
690692
DEBUG_MSG("Packet length:\t\tcaplen=%uB len=%uB\n\n", caplen, len);
691693

src/plugins/storage/cache/src/xxhash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2809,7 +2809,7 @@ XXH64_finalize(xxh_u64 hash, const xxh_u8* ptr, size_t len, XXH_alignment align)
28092809
len -= 8;
28102810
}
28112811
if (len >= 4) {
2812-
hash ^= (xxh_u64) (XXH_get32bits(ptr)) *XXH_PRIME64_1;
2812+
hash ^= (xxh_u64) (XXH_get32bits(ptr)) * XXH_PRIME64_1;
28132813
ptr += 4;
28142814
hash = XXH_rotl64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;
28152815
len -= 4;

0 commit comments

Comments
 (0)