Removed extraneous comments and defaults plus amended variable declaration

Signed-off-by: Steve Taylor <steven@taylormuff.co.uk>
This commit is contained in:
Steve Taylor 2020-03-06 12:42:57 +00:00
parent 920d09c174
commit 06f5664e9d
2 changed files with 1 additions and 6 deletions

View File

@ -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)

View File

@ -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{