daemon: remove intermediate var

The imgSvcConfig is defined locally, and discarded if an error occurs,
so no need to use the intermediate vars here.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-07-18 14:25:41 +02:00
parent 468d6616bf
commit 750c441dfd
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -1141,12 +1141,10 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
imgSvcConfig.Leases = d.containerdClient.LeasesService()
imgSvcConfig.ContentStore = d.containerdClient.ContentStore()
} else {
cs, lm, err := d.configureLocalContentStore(config.ContainerdNamespace)
imgSvcConfig.ContentStore, imgSvcConfig.Leases, err = d.configureLocalContentStore(config.ContainerdNamespace)
if err != nil {
return nil, err
}
imgSvcConfig.ContentStore = cs
imgSvcConfig.Leases = lm
}
// TODO: imageStore, distributionMetadataStore, and ReferenceStore are only