diff options
author | Thomas Haller <thaller@redhat.com> | 2022-11-21 17:44:07 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-11-21 17:56:48 +0100 |
commit | 48d7d1d78eb27a7fb35ff84d9d208e5122a93940 (patch) | |
tree | 70875a8b896cce88d1807acb65c8ccfa77b0b1bd /src/libnm-platform/nm-platform.c | |
parent | 8cc41d41feca14563ea1bbd755c46c6495ba6e0f (diff) | |
download | NetworkManager-ff/platform_ecmp.tar.gz |
platform: drop inline cmp() wrappers around "full" versionsff/platform_ecmp
We sometimes have functions foo() and foo_full(), in which case
foo() has fewer arguments and just calls foo_full(). The "full"
function here is the more powerful one, and foo() is implemented
in terms of the former.
nm_platform_ip4_route_cmp_full() and m_platform_ip4_route_cmp() inverted
that pattern. The "_full" there stands for the full comparison, to not
allowing to select the comparison type.
That inconsistency is ugly. Also, these wrappers were used at only few
places. Let's drop them.
While at it, also drop nm_platform_qdisc_cmp() and rename
nm_platform_qdisc_cmp_full(). Here cmp()/cmp_full() followed the common
pattern foo()/foo_full(), but it's still hardly used and unnecessary.
Diffstat (limited to 'src/libnm-platform/nm-platform.c')
-rw-r--r-- | src/libnm-platform/nm-platform.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/libnm-platform/nm-platform.c b/src/libnm-platform/nm-platform.c index c5fcf50bc4..d28e8771f0 100644 --- a/src/libnm-platform/nm-platform.c +++ b/src/libnm-platform/nm-platform.c @@ -7316,9 +7316,7 @@ nm_platform_qdisc_hash_update(const NMPlatformQdisc *obj, NMHashState *h) } int -nm_platform_qdisc_cmp_full(const NMPlatformQdisc *a, - const NMPlatformQdisc *b, - gboolean compare_handle) +nm_platform_qdisc_cmp(const NMPlatformQdisc *a, const NMPlatformQdisc *b, gboolean compare_handle) { NM_CMP_SELF(a, b); NM_CMP_FIELD(a, b, ifindex); @@ -7355,12 +7353,6 @@ nm_platform_qdisc_cmp_full(const NMPlatformQdisc *a, return 0; } -int -nm_platform_qdisc_cmp(const NMPlatformQdisc *a, const NMPlatformQdisc *b) -{ - return nm_platform_qdisc_cmp_full(a, b, TRUE); -} - const char * nm_platform_tfilter_to_string(const NMPlatformTfilter *tfilter, char *buf, gsize len) { |