mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 00:53:37 +08:00
Rename IP and Ethernet equality checkers from _cmp to _eq
Functions ending in cmp are expected to return 0 on equality but these return non-zero. eth_addr_cmp -> eth_addr_eq ip_addr_cmp -> ip_addr_eq ip4_addr_cmp -> ip4_addr_eq ip6_addr_cmp -> ip6_addr_eq ip_addr_netcmp -> ip_addr_net_eq ip4_addr_netcmp -> ip4_addr_net_eq ip6_addr_netcmp -> ip6_addr_net_eq ip_addr_cmp_zoneless -> ip_addr_zoneless_eq ip6_addr_cmp_zoneless -> ip6_addr_zoneless_eq ip6_addr_cmp_zone -> ip6_addr_zone_eq ip6_addr_netcmp_zoneless -> ip6_addr_net_zoneless_eq ip6_addr_nethostcmp -> ip6_addr_nethost_eq ip6_addr_cmp_packed -> ip6_addr_packed_eq ip6_addr_cmp_solicitednode -> ip6_addr_solicitednode_eq All call sites have been changed, and fallback macros have been added to not break external users.
This commit is contained in:
@@ -32,8 +32,7 @@ START_TEST(test_dns_set_get_server)
|
||||
dns_setserver(i, &server);
|
||||
fail_unless(dns_getserver(i));
|
||||
if (i < DNS_MAX_SERVERS) {
|
||||
/* ip_addr_cmp returns 1 if they match. */
|
||||
fail_unless(ip_addr_cmp(dns_getserver(i), &server) == 1);
|
||||
fail_unless(ip_addr_eq(dns_getserver(i), &server) == 1);
|
||||
} else {
|
||||
fail_unless(ip_addr_isany(dns_getserver(i)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user