Fix a trivial condition statement with enums 26/185626/3 accepted/tizen/unified/20180809.074809 submit/tizen/20180803.081836 submit/tizen/20180808.125613
authorTaesoo Jun <steve.jun@samsung.com>
Wed, 1 Aug 2018 07:16:01 +0000 (16:16 +0900)
committerTaesoo Jun <steve.jun@samsung.com>
Wed, 1 Aug 2018 10:38:03 +0000 (10:38 +0000)
Change-Id: I411ebe7adc76a348c818c09b21eb9b3f3c1488da
Signed-off-by: Taesoo Jun <steve.jun@samsung.com>
test/firewall.c

index 0567613..01b1093 100755 (executable)
@@ -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) {