Fix error shadow and error check warnings

Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
This commit is contained in:
Mrunal Patel
2017-01-06 16:21:23 -08:00
parent 1a9dd2678d
commit c54f1495e3
3 changed files with 11 additions and 11 deletions
+3 -3
View File
@@ -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
}
}