tree-wide: Convert compare_func's to use CMP() macro wherever possible.

Looked for definitions of functions using the *_compare_func() suffix.

Tested:
- Unit tests passed (ninja -C build/ test)
- Installed this build and booted with it.
This commit is contained in:
Filipe Brandenburger
2018-08-06 19:26:35 -07:00
parent 26cdf3e50b
commit a0edd02e43
14 changed files with 86 additions and 120 deletions
+4 -2
View File
@@ -581,9 +581,11 @@ void in_addr_data_hash_func(const void *p, struct siphash *state) {
int in_addr_data_compare_func(const void *a, const void *b) {
const struct in_addr_data *x = a, *y = b;
int r;
if (x->family != y->family)
return x->family - y->family;
r = CMP(x->family, y->family);
if (r != 0)
return r;
return memcmp(&x->address, &y->address, FAMILY_ADDRESS_SIZE(x->family));
}