Skip to content

Commit 8699596

Browse files
committed
libct/(*setnsProcess).Start: use retErr
It is not a good practice to have the name `err` for the error returned by a function. Switch to `retErr`. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 49d4507 commit 8699596

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

libcontainer/process_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ func (p *setnsProcess) signal(sig os.Signal) error {
8686
return unix.Kill(p.pid(), s)
8787
}
8888

89-
func (p *setnsProcess) start() (err error) {
89+
func (p *setnsProcess) start() (retErr error) {
9090
defer p.messageSockPair.parent.Close()
91-
err = p.cmd.Start()
91+
err := p.cmd.Start()
9292
// close the write-side of the pipes (controlled by child)
9393
p.messageSockPair.child.Close()
9494
p.logFilePair.child.Close()
@@ -100,7 +100,7 @@ func (p *setnsProcess) start() (err error) {
100100
return newSystemErrorWithCause(err, "copying bootstrap data to pipe")
101101
}
102102
}
103-
if err = p.execSetns(); err != nil {
103+
if err := p.execSetns(); err != nil {
104104
return newSystemErrorWithCause(err, "executing setns process")
105105
}
106106
if len(p.cgroupPaths) > 0 {

0 commit comments

Comments
 (0)