Explorar o código

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 <pawel.gronowski@docker.com>
Paweł Gronowski hai 1 ano
pai
achega
b805599ef6
Modificáronse 1 ficheiros con 1 adicións e 3 borrados
  1. 1 3
      libcontainerd/local/local_windows.go

+ 1 - 3
libcontainerd/local/local_windows.go

@@ -474,9 +474,7 @@ func (ctr *container) Start(_ context.Context, _ string, withStdin bool, attachS
 	// exit event is not sent out-of-order.
 	// exit event is not sent out-of-order.
 	defer func() { go t.reap() }()
 	defer func() { go t.reap() }()
 
 
-	// Don't shadow err here due to our deferred clean-up.
-	var dio *cio.DirectIO
-	dio, err = newIOFromProcess(newProcess, ctr.ociSpec.Process.Terminal)
+	dio, err := newIOFromProcess(newProcess, ctr.ociSpec.Process.Terminal)
 	if err != nil {
 	if err != nil {
 		logger.WithError(err).Error("failed to get stdio pipes")
 		logger.WithError(err).Error("failed to get stdio pipes")
 		return nil, err
 		return nil, err