浏览代码

Remove extra conditional.

Signed-off-by: David Calavera <david.calavera@gmail.com>
David Calavera 10 年之前
父节点
当前提交
1d5698936a
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      libnetwork/store.go

+ 1 - 4
libnetwork/store.go

@@ -11,10 +11,7 @@ import (
 )
 
 func (c *controller) validateDatastoreConfig() bool {
-	if c.cfg == nil || c.cfg.Datastore.Client.Provider == "" || c.cfg.Datastore.Client.Address == "" {
-		return false
-	}
-	return true
+	return c.cfg != nil && c.cfg.Datastore.Client.Provider != "" && c.cfg.Datastore.Client.Address != ""
 }
 
 func (c *controller) initDataStore() error {