unix: fix staticcheck issues

Change-Id: If7abd7a743c4359a9780401cec7c874d530ee268
Reviewed-on: https://go-review.googlesource.com/c/sys/+/396674
Trust: Matt Layher <mdlayher@gmail.com>
Run-TryBot: Matt Layher <mdlayher@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Matt Layher
2022-03-29 23:18:31 -04:00
parent 43be30ef30
commit e17cdc4130
2 changed files with 6 additions and 2 deletions

View File

@@ -410,6 +410,10 @@ const (
}
got, err := filter(inFiles[0].src, commonSet.keepCommon)
if err != nil {
t.Fatal(err)
}
expected := []byte(mergedFile)
if !bytes.Equal(got, expected) {

View File

@@ -221,14 +221,14 @@ func OpenatTest() {
panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err))
}
if !b {
panic(fmt.Sprintf("Unexpected rights"))
panic("Unexpected rights")
}
b, err = unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_LOOKUP, unix.CAP_WRITE})
if err != nil {
panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err))
}
if b {
panic(fmt.Sprintf("Unexpected rights (2)"))
panic("Unexpected rights (2)")
}
// Can no longer create a file