summaryrefslogtreecommitdiff
path: root/libpod/image
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2020-02-07 02:03:03 +0100
committerMiloslav Trmač <mitr@redhat.com>2020-02-07 23:36:01 +0100
commit1ab4038807eb1586901460119820a4b865ac644f (patch)
tree2f7e546c99f7425892c1d9f014546e03bb60a194 /libpod/image
parentede412f40f662b506d1d7d44d51cd51ef5922f64 (diff)
downloadpodman-1ab4038807eb1586901460119820a4b865ac644f.tar.gz
podman-1ab4038807eb1586901460119820a4b865ac644f.tar.bz2
podman-1ab4038807eb1586901460119820a4b865ac644f.zip
Remove the getLocalImage() call from Image.Size
All ways to create an Image{} have a non-nil .image field, and it is never set to nil, so this is dead code. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod/image')
-rw-r--r--libpod/image/image.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index db14eab18..7efac4214 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -687,13 +687,6 @@ func (i *Image) toImageSourceRef(ctx context.Context) (types.ImageSource, error)
//Size returns the size of the image
func (i *Image) Size(ctx context.Context) (*uint64, error) {
- if i.image == nil {
- localImage, err := i.getLocalImage()
- if err != nil {
- return nil, err
- }
- i.image = localImage
- }
sum, err := i.imageruntime.store.ImageSize(i.ID())
if err == nil && sum >= 0 {
usum := uint64(sum)