libnetwork/datastore: ScopeCfg.IsValid(): un-wrap conditions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-25 14:08:27 +02:00
parent 37cbdeb1f2
commit 478f4aed63
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -116,9 +116,7 @@ func DefaultScope(dataDir string) ScopeCfg {
// IsValid checks if the scope config has valid configuration.
func (cfg *ScopeCfg) IsValid() bool {
if cfg == nil ||
strings.TrimSpace(cfg.Client.Provider) == "" ||
strings.TrimSpace(cfg.Client.Address) == "" {
if cfg == nil || strings.TrimSpace(cfg.Client.Provider) == "" || strings.TrimSpace(cfg.Client.Address) == "" {
return false
}