[ovs-dev] [PATCH 10/19] ofproto: Use enum ofperr for 'error'.
Jarno Rajahalme
jrajahalme at nicira.com
Thu May 14 21:01:12 UTC 2015
Signed-off-by: Jarno Rajahalme <jrajahalme at nicira.com>
---
ofproto/ofproto.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index e689979..cc106e6 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -3866,7 +3866,7 @@ collect_rules_strict(struct ofproto *ofproto,
{
struct oftable *table;
size_t n_readonly = 0;
- int error = 0;
+ enum ofperr error = 0;
rule_collection_init(rules);
@@ -4352,7 +4352,7 @@ add_flow(struct ofproto *ofproto, struct ofputil_flow_mod *fm,
struct cls_rule cr;
struct rule *rule;
uint8_t table_id;
- int error = 0;
+ enum ofperr error = 0;
if (!check_table_id(ofproto, fm->table_id)) {
error = OFPERR_OFPBRC_BAD_TABLE_ID;
@@ -4641,7 +4641,7 @@ modify_flows_loose(struct ofproto *ofproto, struct ofputil_flow_mod *fm,
{
struct rule_criteria criteria;
struct rule_collection rules;
- int error;
+ enum ofperr error;
rule_criteria_init(&criteria, fm->table_id, &fm->match, 0,
fm->cookie, fm->cookie_mask, OFPP_ANY, OFPG11_ANY);
@@ -4670,7 +4670,7 @@ modify_flow_strict(struct ofproto *ofproto, struct ofputil_flow_mod *fm,
{
struct rule_criteria criteria;
struct rule_collection rules;
- int error;
+ enum ofperr error;
rule_criteria_init(&criteria, fm->table_id, &fm->match, fm->priority,
fm->cookie, fm->cookie_mask, OFPP_ANY, OFPG11_ANY);
@@ -6368,7 +6368,6 @@ handle_bundle_control(struct ofconn *ofconn, const struct ofp_header *oh)
return error;
}
-
static enum ofperr
handle_bundle_add(struct ofconn *ofconn, const struct ofp_header *oh)
{
@@ -6602,7 +6601,8 @@ static void
handle_openflow(struct ofconn *ofconn, const struct ofpbuf *ofp_msg)
OVS_EXCLUDED(ofproto_mutex)
{
- int error = handle_openflow__(ofconn, ofp_msg);
+ enum ofperr error = handle_openflow__(ofconn, ofp_msg);
+
if (error) {
ofconn_send_error(ofconn, ofp_msg->data, error);
}
--
1.7.10.4
More information about the dev
mailing list