mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
Fix error shadow and error check warnings
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
+3
-3
@@ -150,7 +150,7 @@ func restoreContainer(context *cli.Context, spec *specs.Spec, config *configs.Co
|
||||
|
||||
setManageCgroupsMode(context, options)
|
||||
|
||||
if err := setEmptyNsMask(context, options); err != nil {
|
||||
if err = setEmptyNsMask(context, options); err != nil {
|
||||
return -1, err
|
||||
}
|
||||
|
||||
@@ -176,8 +176,8 @@ func restoreContainer(context *cli.Context, spec *specs.Spec, config *configs.Co
|
||||
}
|
||||
if pidFile := context.String("pid-file"); pidFile != "" {
|
||||
if err := createPidFile(pidFile, process); err != nil {
|
||||
process.Signal(syscall.SIGKILL)
|
||||
process.Wait()
|
||||
_ = process.Signal(syscall.SIGKILL)
|
||||
_, _ = process.Wait()
|
||||
return -1, err
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user