raft/log: remove redundant code logic (#12346)
Remove redundant code logic Co-authored-by: yangweiwei <yangweiwei@cmss.chinamobile.com>release-3.5
parent
a6b0375b7b
commit
ab4cc3caef
|
@ -359,7 +359,7 @@ func (l *raftLog) mustCheckOutOfBounds(lo, hi uint64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
length := l.lastIndex() + 1 - fi
|
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())
|
l.logger.Panicf("slice[%d,%d) out of bound [%d,%d]", lo, hi, fi, l.lastIndex())
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue