From 9566d4d89487ab0e0ab6791035fa25c11a3cb9db Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 8 Jan 2009 16:35:47 -0800 Subject: [PATCH] Use a uint16_t variable to store a 16-bit value, not an int. This is a style issue, not a bug, because the int only ever held values in the range 0...UINT16_MAX. Found by Chris Eagle via Fortify. --- datapath/dp_act.c | 2 +- udatapath/dp_act.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath/dp_act.c b/datapath/dp_act.c index 3b5086f6..56104506 100644 --- a/datapath/dp_act.c +++ b/datapath/dp_act.c @@ -311,7 +311,7 @@ static uint16_t validate_ofpat(struct datapath *dp, const struct sw_flow_key *key, const struct ofp_action_header *ah, uint16_t type, uint16_t len) { - int ret = ACT_VALIDATION_OK; + uint16_t ret = ACT_VALIDATION_OK; const struct openflow_action *act = &of_actions[type]; if ((len < act->min_size) || (len > act->max_size)) diff --git a/udatapath/dp_act.c b/udatapath/dp_act.c index fc800f00..8579b10a 100644 --- a/udatapath/dp_act.c +++ b/udatapath/dp_act.c @@ -300,7 +300,7 @@ static uint16_t validate_ofpat(struct datapath *dp, const struct sw_flow_key *key, const struct ofp_action_header *ah, uint16_t type, uint16_t len) { - int ret = ACT_VALIDATION_OK; + uint16_t ret = ACT_VALIDATION_OK; const struct openflow_action *act = &of_actions[type]; if ((len < act->min_size) || (len > act->max_size)) { -- 2.30.2