Return pointer from newBaseContainer

It makes code more consistent.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Upstream-commit: 6d9bb99c97438edc996e51e13a0aca0feabc5d26
Component: engine
This commit is contained in:
Alexander Morozov
2015-10-27 09:05:28 -07:00
parent 922b28a2df
commit b9824763f3
3 changed files with 7 additions and 7 deletions
+3 -3
View File
@@ -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>
@@ -492,7 +492,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
+2 -2
View File
@@ -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(),
+2 -2
View File
@@ -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(),