Skip to content

Commit b805599

Browse files
committed
libcontainer/windows: Remove unneeded var declaration
The cleanup defer uses an `outErr` now, so we don't need to worry about shadowing. Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 55b6640 commit b805599

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

libcontainerd/local/local_windows.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,7 @@ func (ctr *container) Start(_ context.Context, _ string, withStdin bool, attachS
474474
// exit event is not sent out-of-order.
475475
defer func() { go t.reap() }()
476476

477-
// Don't shadow err here due to our deferred clean-up.
478-
var dio *cio.DirectIO
479-
dio, err = newIOFromProcess(newProcess, ctr.ociSpec.Process.Terminal)
477+
dio, err := newIOFromProcess(newProcess, ctr.ociSpec.Process.Terminal)
480478
if err != nil {
481479
logger.WithError(err).Error("failed to get stdio pipes")
482480
return nil, err

0 commit comments

Comments
 (0)