ofp-util: Separate output, error reporting in ofputil_port_from_string().
authorBen Pfaff <blp@nicira.com>
Wed, 17 Oct 2012 20:10:08 +0000 (13:10 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 18 Oct 2012 16:23:16 +0000 (09:23 -0700)
commit8010100bb17598479d1b3bb06452546075038f6f
tree60ea082865fbabc60f696b5a4532fa1c98bffade
parent7bcb1506ee2de6a460db35404e642f21d8219b5f
ofp-util: Separate output, error reporting in ofputil_port_from_string().

When I wrote this function I didn't think that port 0 was important (it's
not a valid OpenFlow port number) so I used a return value of 0 to indicate
an error.  However, my assumption turns out to be wrong, so this commit
changes the interface to use the return value only for error reporting
and store the parsed port number into a pointer passed in as a parameter.

This commit doesn't change the behavior of ofputil_port_from_string().

Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/autopath.c
lib/bundle.c
lib/meta-flow.c
lib/ofp-parse.c
lib/ofp-util.c
lib/ofp-util.h
utilities/ovs-ofctl.c