diff options
author | Steve Taylor <steven@taylormuff.co.uk> | 2020-03-06 12:42:57 +0000 |
---|---|---|
committer | Steve Taylor <steven@taylormuff.co.uk> | 2020-03-06 13:19:21 +0000 |
commit | 06f5664e9dc335e3cfc42475e8f807036312a801 (patch) | |
tree | e0223bd2b77a10ee9f480bea6265fbc08395588e | |
parent | 920d09c1740547558c64315c0c2a826fc8294bda (diff) | |
download | podman-06f5664e9dc335e3cfc42475e8f807036312a801.tar.gz podman-06f5664e9dc335e3cfc42475e8f807036312a801.tar.bz2 podman-06f5664e9dc335e3cfc42475e8f807036312a801.zip |
Removed extraneous comments and defaults plus amended variable declaration
Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
-rw-r--r-- | pkg/api/handlers/generic/images.go | 1 | ||||
-rw-r--r-- | pkg/api/handlers/types.go | 6 |
2 files changed, 1 insertions, 6 deletions
diff --git a/pkg/api/handlers/generic/images.go b/pkg/api/handlers/generic/images.go index 63f71eeff..3da5807ec 100644 --- a/pkg/api/handlers/generic/images.go +++ b/pkg/api/handlers/generic/images.go @@ -305,7 +305,6 @@ func GetImages(w http.ResponseWriter, r *http.Request) { utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Failed get images")) return } - // +1 removed from len(images) as this leaves a null entry at the end of the image array var summaries = make([]*handlers.ImageSummary, len(images)) for j, img := range images { is, err := handlers.ImageToImageSummary(img) diff --git a/pkg/api/handlers/types.go b/pkg/api/handlers/types.go index d3e92042f..2e429dc58 100644 --- a/pkg/api/handlers/types.go +++ b/pkg/api/handlers/types.go @@ -355,13 +355,12 @@ func LibpodToContainer(l *libpod.Container, infoData []define.InfoData, sz bool) sizeRootFs int64 sizeRW int64 state define.ContainerStatus - stateStr string ) if state, err = l.State(); err != nil { return nil, err } - stateStr = state.String() + stateStr := state.String() if stateStr == "configured" { stateStr = "created" } @@ -373,9 +372,6 @@ func LibpodToContainer(l *libpod.Container, infoData []define.InfoData, sz bool) if sizeRootFs, err = l.RootFsSize(); err != nil { return nil, err } - } else { - sizeRW = 0 - sizeRootFs = 0 } return &Container{docker.Container{ |