Remove a redundant check
err must be nil at that point. This also un-indents the success case, so that it proceeds as a straight-line code. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
parent
a85892a653
commit
7466f0d0df
|
@ -813,7 +813,6 @@ func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLab
|
|||
return nil, -1, err
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
layer = &Layer{
|
||||
ID: id,
|
||||
Parent: parent,
|
||||
|
@ -894,7 +893,6 @@ func (r *layerStore) Put(id string, parentLayer *Layer, names []string, mountLab
|
|||
return nil, -1, err
|
||||
}
|
||||
layer = copyLayer(layer)
|
||||
}
|
||||
return layer, size, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue