aboutsummaryrefslogtreecommitdiff
path: root/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
diff options
context:
space:
mode:
authorLuca Stefani <luca020400@lineageos.org>2017-08-18 14:00:24 +0200
committerdd3boh <dade.garberi@gmail.com>2017-09-07 13:41:55 +0200
commitf11bc377faf276d1d07ab3b5e7251d40084c0365 (patch)
treefe5d56ee25d44ae16199e47e6af05a92fd41e6fc /data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
parent443e1c0f258af3f8fc19011570aa7950f62ec507 (diff)
oneplus3: ipacm: Fix ordered comparison between pointers and zero
* The check is always true Change-Id: Ib184e0730d95dd22d5a2b09c185def2f55c15998
Diffstat (limited to 'data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp')
-rw-r--r--data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp b/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
index 120a638..6e779e7 100644
--- a/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
+++ b/data-ipa-cfg-mgr/ipacm/src/IPACM_Xml.cpp
@@ -644,12 +644,9 @@ static int IPACM_firewall_xml_parse_tree
memset(content_buf, 0, sizeof(content_buf));
memcpy(content_buf, (void *)content, str_size);
content_buf[MAX_XML_STR_LEN-1] = '\0';
- if (content_buf > 0)
- {
- config->extd_firewall_entries[config->num_extd_firewall_entries - 1].attrib.u.v4.dst_addr_mask
- = ntohl(inet_addr(content_buf));
- IPACMDBG_H("IPv4 destination subnet mask is: %s \n", content_buf);
- }
+ config->extd_firewall_entries[config->num_extd_firewall_entries - 1].attrib.u.v4.dst_addr_mask
+ = ntohl(inet_addr(content_buf));
+ IPACMDBG_H("IPv4 destination subnet mask is: %s \n", content_buf);
}
}
else if (0 == IPACM_util_icmp_string((char*)xml_node->name, IPV4TypeOfService_TAG))