From 8321fb9c570bd25bb8925e7b5116ab90662113b5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 8 Nov 2010 16:36:44 -0800 Subject: [PATCH] ofp-print: Avoid converting flow to ofp_match just to format it. These days we have a function to format a struct flow directly, so we might as well use it. --- lib/ofp-print.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 507ed7db3..f6560747e 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -133,12 +133,11 @@ ofp_packet_in(struct ds *string, const void *oh, size_t len, int verbosity) if (verbosity > 0) { struct flow flow; struct ofpbuf packet; - struct ofp_match match; + packet.data = (void *) op->data; packet.size = data_len; flow_extract(&packet, 0, ntohs(op->in_port), &flow); - flow_to_match(&flow, 0, false, &match); - ofp_print_match(string, &match, verbosity); + flow_format(string, &flow); ds_put_char(string, '\n'); } if (verbosity > 1) { -- 2.43.0