diff --git a/src/plugins/input/parser/parser.cpp b/src/plugins/input/parser/parser.cpp index d2a731cea..fcd117ea5 100644 --- a/src/plugins/input/parser/parser.cpp +++ b/src/plugins/input/parser/parser.cpp @@ -79,30 +79,31 @@ inline uint16_t parse_eth_hdr(const u_char* data_ptr, uint16_t data_len, Packet* DEBUG_MSG("\tDest mac:\t%s\n", ether_ntoa((struct ether_addr*) eth->h_dest)); DEBUG_MSG("\tSrc mac:\t%s\n", ether_ntoa((struct ether_addr*) eth->h_source)); #else - DEBUG_CODE(char src_mac[18]; // ether_ntoa missing on some platforms - char dst_mac[18]; - uint8_t* p = (uint8_t*) eth->h_source; - snprintf( - src_mac, - sizeof(src_mac), - "%02x:%02x:%02x:%02x:%02x:%02x", - p[0], - p[1], - p[2], - p[3], - p[4], - p[5]); - p = (uint8_t*) eth->h_dest; - snprintf( - dst_mac, - sizeof(dst_mac), - "%02x:%02x:%02x:%02x:%02x:%02x", - p[0], - p[1], - p[2], - p[3], - p[4], - p[5]);); + DEBUG_CODE( + char src_mac[18]; // ether_ntoa missing on some platforms + char dst_mac[18]; + uint8_t* p = (uint8_t*) eth->h_source; + snprintf( + src_mac, + sizeof(src_mac), + "%02x:%02x:%02x:%02x:%02x:%02x", + p[0], + p[1], + p[2], + p[3], + p[4], + p[5]); + p = (uint8_t*) eth->h_dest; + snprintf( + dst_mac, + sizeof(dst_mac), + "%02x:%02x:%02x:%02x:%02x:%02x", + p[0], + p[1], + p[2], + p[3], + p[4], + p[5]);); DEBUG_MSG("\tDest mac:\t%s\n", dst_mac); DEBUG_MSG("\tSrc mac:\t%s\n", src_mac); #endif @@ -684,8 +685,9 @@ void parse_packet( uint16_t data_offset = 0; DEBUG_MSG("---------- packet parser #%u -------------\n", ++s_total_pkts); - DEBUG_CODE(char timestamp[32]; time_t time = ts.tv_sec; - strftime(timestamp, sizeof(timestamp), "%FT%T", localtime(&time));); + DEBUG_CODE( + char timestamp[32]; time_t time = ts.tv_sec; + strftime(timestamp, sizeof(timestamp), "%FT%T", localtime(&time));); DEBUG_MSG("Time:\t\t\t%s.%06lu\n", timestamp, ts.tv_usec); DEBUG_MSG("Packet length:\t\tcaplen=%uB len=%uB\n\n", caplen, len); diff --git a/src/plugins/storage/cache/src/xxhash.h b/src/plugins/storage/cache/src/xxhash.h index e8b1d179f..cda22cd67 100644 --- a/src/plugins/storage/cache/src/xxhash.h +++ b/src/plugins/storage/cache/src/xxhash.h @@ -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; ptr += 4; hash = XXH_rotl64(hash, 23) * XXH_PRIME64_2 + XXH_PRIME64_3; len -= 4;