core/platform: compare IPv4 addresses in nm_platform_ip4_*_cmp() as integers, without memcmp()
Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:

committed by
Dan Williams

parent
8d9bfcdd5a
commit
29501c9955
@@ -1934,8 +1934,8 @@ nm_platform_ip4_address_cmp (const NMPlatformIP4Address *a, const NMPlatformIP4A
|
|||||||
_CMP_POINTER (a, b);
|
_CMP_POINTER (a, b);
|
||||||
_CMP_FIELD (a, b, ifindex);
|
_CMP_FIELD (a, b, ifindex);
|
||||||
_CMP_FIELD (a, b, source);
|
_CMP_FIELD (a, b, source);
|
||||||
_CMP_FIELD_MEMCMP (a, b, address);
|
_CMP_FIELD (a, b, address);
|
||||||
_CMP_FIELD_MEMCMP (a, b, peer_address);
|
_CMP_FIELD (a, b, peer_address);
|
||||||
_CMP_FIELD (a, b, plen);
|
_CMP_FIELD (a, b, plen);
|
||||||
_CMP_FIELD (a, b, timestamp);
|
_CMP_FIELD (a, b, timestamp);
|
||||||
_CMP_FIELD (a, b, lifetime);
|
_CMP_FIELD (a, b, lifetime);
|
||||||
@@ -1965,9 +1965,9 @@ nm_platform_ip4_route_cmp (const NMPlatformIP4Route *a, const NMPlatformIP4Route
|
|||||||
_CMP_POINTER (a, b);
|
_CMP_POINTER (a, b);
|
||||||
_CMP_FIELD (a, b, ifindex);
|
_CMP_FIELD (a, b, ifindex);
|
||||||
_CMP_FIELD (a, b, source);
|
_CMP_FIELD (a, b, source);
|
||||||
_CMP_FIELD_MEMCMP (a, b, network);
|
_CMP_FIELD (a, b, network);
|
||||||
_CMP_FIELD (a, b, plen);
|
_CMP_FIELD (a, b, plen);
|
||||||
_CMP_FIELD_MEMCMP (a, b, gateway);
|
_CMP_FIELD (a, b, gateway);
|
||||||
_CMP_FIELD (a, b, metric);
|
_CMP_FIELD (a, b, metric);
|
||||||
_CMP_FIELD (a, b, mss);
|
_CMP_FIELD (a, b, mss);
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user