mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #17405 from LK4D4/cont_pointer
Return pointer from newBaseContainer
This commit is contained in:
commit
82f70677b9
3 changed files with 7 additions and 7 deletions
|
@ -177,10 +177,10 @@ func (daemon *Daemon) load(id string) (*Container, error) {
|
|||
}
|
||||
|
||||
if container.ID != id {
|
||||
return &container, fmt.Errorf("Container %s is stored at %s", container.ID, id)
|
||||
return container, fmt.Errorf("Container %s is stored at %s", container.ID, id)
|
||||
}
|
||||
|
||||
return &container, nil
|
||||
return container, nil
|
||||
}
|
||||
|
||||
// Register makes a container object usable by the daemon as <container.ID>
|
||||
|
@ -484,7 +484,7 @@ func (daemon *Daemon) newContainer(name string, config *runconfig.Config, imgID
|
|||
base.Driver = daemon.driver.String()
|
||||
base.ExecDriver = daemon.execDriver.Name()
|
||||
|
||||
return &base, err
|
||||
return base, err
|
||||
}
|
||||
|
||||
// GetFullContainerName returns a constructed container name. I think
|
||||
|
|
|
@ -599,8 +599,8 @@ func (daemon *Daemon) registerLinks(container *Container, hostConfig *runconfig.
|
|||
return nil
|
||||
}
|
||||
|
||||
func (daemon *Daemon) newBaseContainer(id string) Container {
|
||||
return Container{
|
||||
func (daemon *Daemon) newBaseContainer(id string) *Container {
|
||||
return &Container{
|
||||
CommonContainer: CommonContainer{
|
||||
ID: id,
|
||||
State: NewState(),
|
||||
|
|
|
@ -140,8 +140,8 @@ func (daemon *Daemon) registerLinks(container *Container, hostConfig *runconfig.
|
|||
return nil
|
||||
}
|
||||
|
||||
func (daemon *Daemon) newBaseContainer(id string) Container {
|
||||
return Container{
|
||||
func (daemon *Daemon) newBaseContainer(id string) *Container {
|
||||
return &Container{
|
||||
CommonContainer: CommonContainer{
|
||||
ID: id,
|
||||
State: NewState(),
|
||||
|
|
Loading…
Add table
Reference in a new issue