ofproto: Simplify bucket finding in facet_max_idle()
authorSimon Horman <horms@verge.net.au>
Thu, 30 Jun 2011 11:34:15 +0000 (20:34 +0900)
committerBen Pfaff <blp@nicira.com>
Thu, 30 Jun 2011 16:34:21 +0000 (09:34 -0700)
commitf11c1ef433cfa363c779176007cbcb9d73b3203a
tree51b1627dac9726f31ac850ca3ce550b3383829d1
parentdc29f566c17913652984824ce54887fc7903c08d
ofproto: Simplify bucket finding in facet_max_idle()

The existing dual-loop setup is unnecessary
as the outer loop only skips to the first non-zero value
and then exits once the inner loop completes.
Zero values in the inner loop have no affect on its logic.

Signed-off-by: Simon Horman <horms@verge.net.au>
[pushed declaration of subtotal out to function scope]
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto-dpif.c