ofp-util: Improve return type of ofputil_decode_packet_in().
authorBen Pfaff <blp@nicira.com>
Thu, 7 Jun 2012 03:13:49 +0000 (23:13 -0400)
committerBen Pfaff <blp@nicira.com>
Wed, 13 Jun 2012 04:19:35 +0000 (21:19 -0700)
"enum ofperr" is clearer than "int".

Reviewed-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/ofp-util.c
lib/ofp-util.h

index 07f885d2b68c15653e4bd776b36965aa680f7b87..6d820b2f40e3654986c716d2e27721b6ab21a5c5 100644 (file)
@@ -2318,7 +2318,7 @@ ofputil_encode_flow_removed(const struct ofputil_flow_removed *fr,
     return msg;
 }
 
-int
+enum ofperr
 ofputil_decode_packet_in(struct ofputil_packet_in *pin,
                          const struct ofp_header *oh)
 {
index 6b3128a5a100b02b085dd6df0b1bc61b8dad0766..aaab83cbdbc091f0b65af45a4ad4d250863b71cc 100644 (file)
@@ -334,8 +334,8 @@ struct ofputil_packet_in {
     struct flow_metadata fmd;   /* Metadata at creation time. */
 };
 
-int ofputil_decode_packet_in(struct ofputil_packet_in *,
-                             const struct ofp_header *);
+enum ofperr ofputil_decode_packet_in(struct ofputil_packet_in *,
+                                     const struct ofp_header *);
 struct ofpbuf *ofputil_encode_packet_in(const struct ofputil_packet_in *,
                                         enum nx_packet_in_format);