Merge pull request #9969 from Quasilyte/quasilyte/boolExprSimplify

etcdserver/api/v2discovery: simplify !(x == y) to x != y
This commit is contained in:
Xiang Li
2018-07-28 15:47:05 -07:00
committed by GitHub

View File

@ -275,7 +275,7 @@ func (d *discovery) checkCluster() ([]*client.Node, int, uint64, error) {
var nodes []*client.Node
// append non-config keys to nodes
for _, n := range resp.Node.Nodes {
if !(path.Base(n.Key) == path.Base(configKey)) {
if path.Base(n.Key) != path.Base(configKey) {
nodes = append(nodes, n)
}
}