X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-ofctl.c;h=7c20d7ad366cfaaa3c92179db61bdaaecff30ce5;hb=14986b312eebf556c20e03b49fbff51859e38c5a;hp=9efd484ff176b8178cc9759a88567bc0b92b6a95;hpb=cae7a4b90a55cbfd4cfd23c06f9f09cd429ab4c0;p=openvswitch diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 9efd484f..7c20d7ad 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -948,15 +948,11 @@ static void do_del_flows(const struct settings *s, int argc, char *argv[]) uint16_t out_port; struct ofpbuf *buffer; struct ofp_flow_mod *ofm; - struct ofp_match match; - /* Parse and send. str_to_flow() will expand and reallocate the data in - * 'buffer', so we can't keep pointers to across the str_to_flow() call. */ - make_openflow(sizeof *ofm, OFPT_FLOW_MOD, &buffer); - str_to_flow(argc > 2 ? argv[2] : "", &match, buffer, - NULL, &out_port, &priority, NULL, NULL); - ofm = buffer->data; - ofm->match = match; + /* Parse and send. */ + ofm = make_openflow(sizeof *ofm, OFPT_FLOW_MOD, &buffer); + str_to_flow(argc > 2 ? argv[2] : "", &ofm->match, NULL, NULL, + &out_port, &priority, NULL, NULL); if (s->strict) { ofm->command = htons(OFPFC_DELETE_STRICT); } else { @@ -1139,7 +1135,7 @@ do_ping(const struct settings *s UNUSED, int argc, char *argv[]) printf("Reply:\n"); ofp_print(stdout, reply, reply->size, 2); } - printf("%d bytes from %s: xid=%08"PRIx32" time=%.1f ms\n", + printf("%zu bytes from %s: xid=%08"PRIx32" time=%.1f ms\n", reply->size - sizeof *rpy_hdr, argv[1], rpy_hdr->xid, (1000*(double)(end.tv_sec - start.tv_sec)) + (.001*(end.tv_usec - start.tv_usec)));