ofproto: Fix compiler warning.
authorEthan Jackson <ethan@nicira.com>
Thu, 19 May 2011 01:07:57 +0000 (18:07 -0700)
committerEthan Jackson <ethan@nicira.com>
Thu, 19 May 2011 18:33:33 +0000 (11:33 -0700)
ofproto/ofproto.c:1681:9: error: format '%d' expects argument of
type 'int', but argument 3 has type 'size_t'

ofproto/ofproto.c

index beab99c..be0fccc 100644 (file)
@@ -1678,7 +1678,7 @@ handle_table_stats_request(struct ofconn *ofconn,
     ots = ofpbuf_put_zeros(msg, sizeof *ots * p->n_tables);
     for (i = 0; i < p->n_tables; i++) {
         ots[i].table_id = i;
-        sprintf(ots[i].name, "table%d", i);
+        sprintf(ots[i].name, "table%zu", i);
         ots[i].wildcards = htonl(OFPFW_ALL);
         ots[i].max_entries = htonl(1000000); /* An arbitrary big number. */
         ots[i].active_count = htonl(classifier_count(&p->tables[i]));