From f1c9a70b47d226766e0bca2b29d5089655d7e5cf Mon Sep 17 00:00:00 2001 From: BinacsLee Date: Wed, 20 Jul 2022 10:13:57 +0800 Subject: [PATCH] cleanup: simplify the function implementation of IPSet --- pkg/proxy/ipvs/ipset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/proxy/ipvs/ipset.go b/pkg/proxy/ipvs/ipset.go index 510d4c98fe8..5f2891c5893 100644 --- a/pkg/proxy/ipvs/ipset.go +++ b/pkg/proxy/ipvs/ipset.go @@ -133,7 +133,7 @@ func (set *IPSet) validateEntry(entry *utilipset.Entry) bool { } func (set *IPSet) isEmpty() bool { - return len(set.activeEntries.UnsortedList()) == 0 + return set.activeEntries.Len() == 0 } func (set *IPSet) getComment() string {