etcdserver: remove redundant parentheses.

This commit is contained in:
caoming
2019-01-07 10:27:52 +08:00
parent f0aeb705ce
commit 802e2aaadd
4 changed files with 6 additions and 6 deletions

View File

@ -338,8 +338,8 @@ func (n *node) UpdateTTL(expireTime time.Time) {
// Compare function compares node index and value with provided ones.
// second result value explains result and equals to one of Compare.. constants
func (n *node) Compare(prevValue string, prevIndex uint64) (ok bool, which int) {
indexMatch := (prevIndex == 0 || n.ModifiedIndex == prevIndex)
valueMatch := (prevValue == "" || n.Value == prevValue)
indexMatch := prevIndex == 0 || n.ModifiedIndex == prevIndex
valueMatch := prevValue == "" || n.Value == prevValue
ok = valueMatch && indexMatch
switch {
case valueMatch && indexMatch: