From ab4cc3caef3d6a1bb7c8c9e79749357eafef42df Mon Sep 17 00:00:00 2001 From: vivian Date: Wed, 30 Sep 2020 10:48:32 +0800 Subject: [PATCH] raft/log: remove redundant code logic (#12346) Remove redundant code logic Co-authored-by: yangweiwei --- raft/log.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raft/log.go b/raft/log.go index 342d8f4ce..c4162d667 100644 --- a/raft/log.go +++ b/raft/log.go @@ -359,7 +359,7 @@ func (l *raftLog) mustCheckOutOfBounds(lo, hi uint64) error { } length := l.lastIndex() + 1 - fi - if lo < fi || hi > fi+length { + if hi > fi+length { l.logger.Panicf("slice[%d,%d) out of bound [%d,%d]", lo, hi, fi, l.lastIndex()) } return nil