From 215d42fef86577ad74151cda553a20b1bdb58a30 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Thu, 30 Oct 2008 16:17:52 +0100 Subject: snprintf: fix compilation warning in 64-bits platforms We have to cast the counters to unsigned long long to fix a compilation warning in 64-bits platforms. Signed-off-by: Pablo Neira Ayuso --- src/conntrack/snprintf_xml.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/conntrack/snprintf_xml.c b/src/conntrack/snprintf_xml.c index 9cd49cf..b14ff43 100644 --- a/src/conntrack/snprintf_xml.c +++ b/src/conntrack/snprintf_xml.c @@ -191,11 +191,11 @@ static int __snprintf_counters_xml(char *buf, unsigned int size = 0, offset = 0; ret = snprintf(buf, len, "%llu", - ct->counters[type].packets); + (unsigned long long)ct->counters[type].packets); BUFFER_SIZE(ret, size, len, offset); ret = snprintf(buf+offset, len, "%llu", - ct->counters[type].bytes); + (unsigned long long)ct->counters[type].bytes); BUFFER_SIZE(ret, size, len, offset); return size; -- cgit v1.2.3