From: Ben Pfaff Date: Thu, 7 Jun 2012 03:13:49 +0000 (-0400) Subject: ofp-util: Improve return type of ofputil_decode_packet_in(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7cc6bd82f5ff86369c5719fdd81420af5ddf0c3;p=openvswitch ofp-util: Improve return type of ofputil_decode_packet_in(). "enum ofperr" is clearer than "int". Reviewed-by: Simon Horman Signed-off-by: Ben Pfaff --- diff --git a/lib/ofp-util.c b/lib/ofp-util.c index 07f885d2..6d820b2f 100644 --- a/lib/ofp-util.c +++ b/lib/ofp-util.c @@ -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) { diff --git a/lib/ofp-util.h b/lib/ofp-util.h index 6b3128a5..aaab83cb 100644 --- a/lib/ofp-util.h +++ b/lib/ofp-util.h @@ -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);