diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-15 09:19:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-15 09:19:40 -0400 |
commit | f4c3b718eb22a161a897a6ed55d10f3a07e31aa8 (patch) | |
tree | bb453d40a50f8cef1ebfedc73e43e2c7fe7d3456 /libpod/container_internal.go | |
parent | e94e3fd2e829fd2cd38428aa9d9bf68b37bb8407 (diff) | |
parent | 200cfa41a434b7143620c2c252b3eb7ab3ef92f9 (diff) | |
download | podman-f4c3b718eb22a161a897a6ed55d10f3a07e31aa8.tar.gz podman-f4c3b718eb22a161a897a6ed55d10f3a07e31aa8.tar.bz2 podman-f4c3b718eb22a161a897a6ed55d10f3a07e31aa8.zip |
Merge pull request #6557 from rhatdan/lint
Turn on More linters
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index f6fc3c1a4..73e0b2118 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -239,7 +239,7 @@ func (c *Container) handleRestartPolicy(ctx context.Context) (restarted bool, er logrus.Debugf("Restarting container %s due to restart policy %s", c.ID(), c.config.RestartPolicy) // Need to check if dependencies are alive. - if err = c.checkDependenciesAndHandleError(ctx); err != nil { + if err = c.checkDependenciesAndHandleError(); err != nil { return false, err } @@ -513,7 +513,7 @@ func (c *Container) teardownStorage() error { // Reset resets state fields to default values. // It is performed before a refresh and clears the state after a reboot. // It does not save the results - assumes the database will do that for us. -func resetState(state *ContainerState) error { +func resetState(state *ContainerState) { state.PID = 0 state.ConmonPID = 0 state.Mountpoint = "" @@ -527,8 +527,6 @@ func resetState(state *ContainerState) error { state.StoppedByUser = false state.RestartPolicyMatch = false state.RestartCount = 0 - - return nil } // Refresh refreshes the container's state after a restart. @@ -756,7 +754,7 @@ func (c *Container) prepareToStart(ctx context.Context, recursive bool) (err err } if !recursive { - if err := c.checkDependenciesAndHandleError(ctx); err != nil { + if err := c.checkDependenciesAndHandleError(); err != nil { return err } } else { @@ -792,7 +790,7 @@ func (c *Container) prepareToStart(ctx context.Context, recursive bool) (err err } // checks dependencies are running and prints a helpful message -func (c *Container) checkDependenciesAndHandleError(ctx context.Context) error { +func (c *Container) checkDependenciesAndHandleError() error { notRunning, err := c.checkDependenciesRunning() if err != nil { return errors.Wrapf(err, "error checking dependencies for container %s", c.ID()) |