mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
client: remove unnecessary err check and unused variable ioErr
Removes an unnecessary err check where ioErr was never assigned to a value and therefore always nil. Also removes the variable all together since it is now no longer used anywhere. Signed-off-by: karo <karolin.kostial@gmail.com>
This commit is contained in:
@@ -462,7 +462,6 @@ func (r *ProtocolIncus) CreateImage(image api.ImagesPost, args *ImageCreateArgs)
|
||||
}
|
||||
|
||||
// Prepare the body
|
||||
var ioErr error
|
||||
var body io.Reader
|
||||
var contentType string
|
||||
if args.RootfsFile == nil {
|
||||
@@ -610,10 +609,6 @@ func (r *ProtocolIncus) CreateImage(image api.ImagesPost, args *ImageCreateArgs)
|
||||
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
|
||||
if ioErr != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Handle errors
|
||||
response, _, err := incusParseResponse(resp)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user