From: Jan Engelhardt Date: Fri, 5 Jun 2015 11:50:37 +0000 (+0200) Subject: iptaccount: cast from uint64_t to please printf X-Git-Tag: v2.7~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01f97bfdd18200feda3a7dfb99c15da06291fc7a;p=thirdparty%2Fxtables-addons.git iptaccount: cast from uint64_t to please printf %llu wants an "unsigned long long", which is not necessarily the same as uint64_t. --- diff --git a/extensions/ACCOUNT/iptaccount.c b/extensions/ACCOUNT/iptaccount.c index e3fe597..b60a099 100644 --- a/extensions/ACCOUNT/iptaccount.c +++ b/extensions/ACCOUNT/iptaccount.c @@ -201,12 +201,18 @@ int main(int argc, char *argv[]) { if (doCSV) printf("%s;%llu;%llu;%llu;%llu\n", - addr_to_dotted(entry->ip), entry->src_packets, entry->src_bytes, - entry->dst_packets, entry->dst_bytes); + addr_to_dotted(entry->ip), + (unsigned long long)entry->src_packets, + (unsigned long long)entry->src_bytes, + (unsigned long long)entry->dst_packets, + (unsigned long long)entry->dst_bytes); else printf("IP: %s SRC packets: %llu bytes: %llu DST packets: %llu bytes: %llu\n", - addr_to_dotted(entry->ip), entry->src_packets, entry->src_bytes, - entry->dst_packets, entry->dst_bytes); + addr_to_dotted(entry->ip), + (unsigned long long)entry->src_packets, + (unsigned long long)entry->src_bytes, + (unsigned long long)entry->dst_packets, + (unsigned long long)entry->dst_bytes); } if (doContinue)