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 19:58:53 +0000 (12:58 -0700)
commit21ae82ffb3e3d1459055024c8a447365499a60f4
tree9cc913d544549162e0bbf2200f4c1bbc86f3da1d
parent0a18743a896dc7d6496857129e018eb5361bd84c
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