ofp-util: Rewrite action decoding to improve compiler warnings.
authorBen Pfaff <blp@nicira.com>
Fri, 5 Aug 2011 22:48:45 +0000 (15:48 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 8 Aug 2011 17:21:13 +0000 (10:21 -0700)
The previous implementation of ofputil_decode_action() had two weaknesses.
First, the action lengths in its tables were written as literal integers
instead of using "sizeof".  Second, it used arrays for tables instead of
switch statements, which meant that GCC didn't warn when someone added a
new action type but forgot to add an entry to the tables.

This rewrite fixes both of those problems.

Suggested-by: Ethan Jackson <ethan@nicira.com>

No differences found