ofproto: Reduce duplication in deletion logic.
authorBen Pfaff <blp@nicira.com>
Thu, 5 Jun 2014 16:58:40 +0000 (09:58 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 12 Jun 2014 21:46:54 +0000 (14:46 -0700)
commit9ca4a86fffcda89098588cbdd9ba0c21aa60a9c8
tree1ec2f600e6aa401aa46a0525de0bb41b45d2c56c
parent4c7562c5a43863a820702e160678aad625a28f62
ofproto: Reduce duplication in deletion logic.

The delete_flow__() function had two callers, each of which had to
correctly call ofmonitor_flush() when completely done.  An upcoming commit
will add another function that the callers need to call.  This is easier
if delete_flow__() only has one caller, so this commit refactors so that
it does, and inlines delete_flow__() into that caller for further
simplification.

Also remove a parameter from delete_flows__() that wasn't really needed
and change its return type to void since it can't ever fail.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Acked-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto.c