mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft/log: remove redundant code logic (#12346)
Remove redundant code logic Co-authored-by: yangweiwei <yangweiwei@cmss.chinamobile.com>
This commit is contained in:
parent
a6b0375b7b
commit
ab4cc3caef
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user