From: Taesoo Jun Date: Wed, 1 Aug 2018 07:16:01 +0000 (+0900) Subject: Fix a trivial condition statement with enums X-Git-Tag: submit/tizen/20180803.081836^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c1c9da5728388ad954f9d1554b635cfaec4df689;p=platform%2Fcore%2Fapi%2Fsmart-traffic-control.git Fix a trivial condition statement with enums Change-Id: I411ebe7adc76a348c818c09b21eb9b3f3c1488da Signed-off-by: Taesoo Jun --- diff --git a/test/firewall.c b/test/firewall.c index 0567613..01b1093 100755 --- a/test/firewall.c +++ b/test/firewall.c @@ -112,13 +112,10 @@ static void __test_stc_fw_print_rule(stc_firewall_rule_h rule_h) FREE(chain); } - if (direction > STC_FIREWALL_DIRECTION_NONE && - direction <= STC_FIREWALL_DIRECTION_OUT) { - ret = stc_firewall_rule_get_direction(rule_h, &direction); - if (ret == STC_ERROR_NONE) - msg("Direction: " LOG_CYAN "[%s]" LOG_END, - test_stc_convert_fw_direction_to_string(direction)); - } + ret = stc_firewall_rule_get_direction(rule_h, &direction); + if (ret == STC_ERROR_NONE) + msg("Direction: " LOG_CYAN "[%s]" LOG_END, + test_stc_convert_fw_direction_to_string(direction)); ret = stc_firewall_rule_get_ifname(rule_h, &ifname); if (ret == STC_ERROR_NONE) { @@ -147,13 +144,10 @@ static void __test_stc_fw_print_rule(stc_firewall_rule_h rule_h) FREE(s_ip2); } - if (d_ip_type > STC_FIREWALL_IP_NONE && - d_ip_type <= STC_FIREWALL_IP_RANGE) { - ret = stc_firewall_rule_get_dst_ip_type(rule_h, &d_ip_type); - if (ret == STC_ERROR_NONE) - msg("DstIPtype: " LOG_CYAN "[%s]" LOG_END, - test_stc_convert_fw_ip_type_to_string(d_ip_type)); - } + ret = stc_firewall_rule_get_dst_ip_type(rule_h, &d_ip_type); + if (ret == STC_ERROR_NONE) + msg("DstIPtype: " LOG_CYAN "[%s]" LOG_END, + test_stc_convert_fw_ip_type_to_string(d_ip_type)); ret = stc_firewall_rule_get_dst_ip(rule_h, &d_ip1, &d_ip2); if (ret == STC_ERROR_NONE) {