From 9ca76894292bcb9aafbdaa63f24e370b1a6ccac8 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 9 Mar 2010 10:03:29 -0800 Subject: [PATCH] ofproto: Avoid extra call to time_msec(). compose_flow_removed() already has the current time conveniently provided as a parameter, so there is no need to call time_msec() directly. Also squashes an annoying GCC warning about an unused parameter. --- ofproto/ofproto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 1a653ec41..fcc76d6cb 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -3335,7 +3335,7 @@ compose_flow_removed(const struct rule *rule, long long int now, uint8_t reason) { struct ofp_flow_removed *ofr; struct ofpbuf *buf; - long long int tdiff = time_msec() - rule->created; + long long int tdiff = now - rule->created; uint32_t sec = tdiff / 1000; uint32_t msec = tdiff - (sec * 1000); -- 2.43.0