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:
parent
468d6616bf
commit
750c441dfd
1 changed files with 1 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue