From 2877a343c358ab62987432cbc572823292c4ef14 Mon Sep 17 00:00:00 2001 From: ZhangTao1596 Date: Fri, 30 Apr 2021 12:40:53 +0800 Subject: [PATCH] [#498] audit: skip unnecessary statement Signed-off-by: ZhangTao1596 --- pkg/services/audit/auditor/util.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/services/audit/auditor/util.go b/pkg/services/audit/auditor/util.go index d521cb96c5..0982fe7ab8 100644 --- a/pkg/services/audit/auditor/util.go +++ b/pkg/services/audit/auditor/util.go @@ -11,11 +11,9 @@ func nextRandUint64(n uint64, exclude map[uint64]struct{}) uint64 { ind := randUint64(n - ln) - for i := uint64(0); ; i++ { - if i >= ind { - if _, ok := exclude[i]; !ok { - return i - } + for i := ind; ; i++ { + if _, ok := exclude[i]; !ok { + return i } } }