Skip to content

Commit

Permalink
Removed extraneous comments and defaults plus amended variable declar…
Browse files Browse the repository at this point in the history
…ation

Signed-off-by: Steve Taylor <[email protected]>
  • Loading branch information
st1971 committed Mar 6, 2020
1 parent 920d09c commit 06f5664
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion pkg/api/handlers/generic/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions pkg/api/handlers/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand All @@ -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{
Expand Down

0 comments on commit 06f5664

Please sign in to comment.