[ovs-dev] [PATCH] ofproto-dpif: Fix format specifier.

Ben Pfaff blp at nicira.com
Tue Jun 11 20:38:57 UTC 2013


list_size() returns a size_t, not a uint64_t.

Found by GCC.

Signed-off-by: Ben Pfaff <blp at nicira.com>
---
 ofproto/ofproto-dpif.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index 8df2679..8bc3352 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -8633,8 +8633,7 @@ ofproto_unixctl_dpif_dump_megaflows(struct unixctl_conn *conn,
     CLS_CURSOR_FOR_EACH (facet, cr, &cursor) {
         cls_rule_format(&facet->cr, &ds);
         ds_put_cstr(&ds, ", ");
-        ds_put_format(&ds, "n_subfacets:%"PRIu64", ",
-                      list_size(&facet->subfacets));
+        ds_put_format(&ds, "n_subfacets:%zu, ", list_size(&facet->subfacets));
         ds_put_format(&ds, "used:%.3fs, ", (now - facet->used) / 1000.0);
         ds_put_cstr(&ds, "Datapath actions: ");
         format_odp_actions(&ds, facet->xout.odp_actions.data,
-- 
1.7.2.5




More information about the dev mailing list