%llu correctly prints u_int64_t
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 7 Aug 2009 07:50:36 +0000 (09:50 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 7 Aug 2009 07:50:36 +0000 (09:50 +0200)
src/charon/plugins/stroke/stroke_list.c
src/charon/sa/tasks/child_delete.c

index 7aa80dc..6f421bd 100644 (file)
@@ -207,14 +207,14 @@ static void log_child_sa(FILE *out, child_sa_t *child_sa, bool all)
                        }
 
                        child_sa->get_usestats(child_sa, TRUE, &use_in, &bytes_in);
-                       fprintf(out, ", %u bytes_i", (u_int)bytes_in);
+                       fprintf(out, ", %llu bytes_i", bytes_in);
                        if (use_in)
                        {
                                fprintf(out, " (%ds ago)", now - use_in);
                        }
 
                        child_sa->get_usestats(child_sa, FALSE, &use_out, &bytes_out);
-                       fprintf(out, ", %u bytes_o", (u_int)bytes_out);
+                       fprintf(out, ", %llu bytes_o", bytes_out);
                        if (use_out)
                        {
                                fprintf(out, " (%ds ago)", now - use_out);
index 4de7c03..7abb07a 100644 (file)
@@ -249,10 +249,10 @@ static void log_children(private_child_delete_t *this)
                child_sa->get_usestats(child_sa, FALSE, NULL, &bytes_out);
                
                DBG0(DBG_IKE, "closing CHILD_SA %s{%d} "
-                        "with SPIs %.8x_i (%u bytes) %.8x_o (%u bytes) and TS %#R=== %#R",
+                        "with SPIs %.8x_i (%llu bytes) %.8x_o (%llu bytes) and TS %#R=== %#R",
                         child_sa->get_name(child_sa), child_sa->get_reqid(child_sa),
-                        ntohl(child_sa->get_spi(child_sa, TRUE)),  (u_int)bytes_in,
-                        ntohl(child_sa->get_spi(child_sa, FALSE)), (u_int)bytes_out,
+                        ntohl(child_sa->get_spi(child_sa, TRUE)), bytes_in,
+                        ntohl(child_sa->get_spi(child_sa, FALSE)), bytes_out,
                         child_sa->get_traffic_selectors(child_sa, TRUE),
                         child_sa->get_traffic_selectors(child_sa, FALSE));
        }