From 719d70d2e37d35026c6ec0165ffe6e97b074e473 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 7 Jan 2021 13:33:41 -0800 Subject: [PATCH] setupIO: simplify code There's no need to check err for nil. Signed-off-by: Kir Kolyshkin --- utils_linux.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/utils_linux.go b/utils_linux.go index f15537fa7..8241d4232 100644 --- a/utils_linux.go +++ b/utils_linux.go @@ -164,10 +164,7 @@ func setupIO(process *libcontainer.Process, rootuid, rootgid int, createTTY, det t.postStart = append(t.postStart, parent, child) t.consoleC = make(chan error, 1) go func() { - if err := t.recvtty(process, parent); err != nil { - t.consoleC <- err - } - t.consoleC <- nil + t.consoleC <- t.recvtty(process, parent) }() } else { // the caller of runc will handle receiving the console master