odp-util: Use switch for checking values of an enum.
authorBen Pfaff <blp@nicira.com>
Wed, 2 May 2012 21:23:28 +0000 (14:23 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 9 May 2012 20:28:37 +0000 (13:28 -0700)
commit9167e1afd39a4b15ff5fc0f7ca09bcb7c011edd6
tree97c041db9f742ab55aa8eb6fbd29f963ff0e5ae6
parentf14c5c8ebc57c95e031c466f868cd0523772b5be
odp-util: Use switch for checking values of an enum.

The compiler warns when we forget to handle some value of an enum, whereas
it won't for a sequence of 'if' statements.

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/odp-util.c
ofproto/ofproto-dpif.c