]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
iptaccount: cast from uint64_t to please printf
authorJan Engelhardt <jengelh@inai.de>
Fri, 5 Jun 2015 11:50:37 +0000 (13:50 +0200)
committerJan Engelhardt <jengelh@inai.de>
Fri, 5 Jun 2015 11:51:56 +0000 (13:51 +0200)
%llu wants an "unsigned long long", which is not necessarily
the same as uint64_t.

extensions/ACCOUNT/iptaccount.c

index e3fe597db4449544de01b211419d5bb6e93fa54b..b60a0996badeee29d7e2f67e54219952b11053bd 100644 (file)
@@ -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)