X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=utilities%2Fovs-ofctl.c;h=a67a5547dfab6e90cdd7b9d20e480fc687e5cad3;hb=85340733d77c62d5ee6d54fe439152ffbd12b74e;hp=a0b70793b93413a247491aa3ffde5c1de308d75a;hpb=64626975103668a5662622819536780ba87bef79;p=openvswitch diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index a0b70793..a67a5547 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -741,8 +741,9 @@ fetch_ofputil_phy_port(const char *vconn_name, const char *port_name, static uint16_t str_to_port_no(const char *vconn_name, const char *port_name) { - uint16_t port_no = ofputil_port_from_string(port_name); - if (port_no) { + uint16_t port_no; + + if (ofputil_port_from_string(port_name, &port_no)) { return port_no; } else { struct ofputil_phy_port pp;