mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 17:32:23 +00:00
Fixed compilation warnings on linux32 platforms.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
12
nDPId-test.c
12
nDPId-test.c
@@ -1076,8 +1076,16 @@ int main(int argc, char ** argv)
|
||||
nDPId_return.total_active_flows != nDPId_return.total_idle_flows)
|
||||
{
|
||||
logger(1, "%s: %s", argv[0], "Memory / Flow leak detected.");
|
||||
logger(1, "%s: Allocated / Free'd bytes: %lu / %lu", argv[0], ndpi_memory_alloc_bytes, ndpi_memory_free_bytes);
|
||||
logger(1, "%s: Allocated / Free'd count: %lu / %lu", argv[0], ndpi_memory_alloc_count, ndpi_memory_free_count);
|
||||
logger(1,
|
||||
"%s: Allocated / Free'd bytes: %llu / %llu",
|
||||
argv[0],
|
||||
(unsigned long long int)ndpi_memory_alloc_bytes,
|
||||
(unsigned long long int)ndpi_memory_free_bytes);
|
||||
logger(1,
|
||||
"%s: Allocated / Free'd count: %llu / %llu",
|
||||
argv[0],
|
||||
(unsigned long long int)ndpi_memory_alloc_count,
|
||||
(unsigned long long int)ndpi_memory_free_count);
|
||||
logger(1,
|
||||
"%s: Total Active / Idle Flows: %llu / %llu",
|
||||
argv[0],
|
||||
|
||||
6
nDPId.c
6
nDPId.c
@@ -2101,15 +2101,15 @@ static void send_to_collector(struct nDPId_reader_thread * const reader_thread,
|
||||
}
|
||||
else if (collector_address.raw.sa_family == AF_UNIX)
|
||||
{
|
||||
off_t pos = (written < 0 ? 0 : written);
|
||||
size_t pos = (written < 0 ? 0 : written);
|
||||
logger(0,
|
||||
"[%8llu, %zu] Send less data then expected (%zd < %d bytes), falling back to blocking I/O",
|
||||
"[%8llu, %zu] Send less data then expected (%zu < %d bytes), falling back to blocking I/O",
|
||||
workflow->packets_captured,
|
||||
reader_thread->array_index,
|
||||
pos,
|
||||
s_ret);
|
||||
set_collector_block(reader_thread);
|
||||
while ((written = write(reader_thread->collector_sockfd, newline_json_str + pos, s_ret - pos)) !=
|
||||
while ((size_t)(written = write(reader_thread->collector_sockfd, newline_json_str + pos, s_ret - pos)) !=
|
||||
s_ret - pos)
|
||||
{
|
||||
saved_errno = errno;
|
||||
|
||||
Reference in New Issue
Block a user