mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-31 22:36:44 -04:00
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:
@@ -410,6 +410,10 @@ const (
|
|||||||
}
|
}
|
||||||
|
|
||||||
got, err := filter(inFiles[0].src, commonSet.keepCommon)
|
got, err := filter(inFiles[0].src, commonSet.keepCommon)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
expected := []byte(mergedFile)
|
expected := []byte(mergedFile)
|
||||||
|
|
||||||
if !bytes.Equal(got, expected) {
|
if !bytes.Equal(got, expected) {
|
||||||
|
|||||||
@@ -221,14 +221,14 @@ func OpenatTest() {
|
|||||||
panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err))
|
panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err))
|
||||||
}
|
}
|
||||||
if !b {
|
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})
|
b, err = unix.CapRightsIsSet(r, []uint64{unix.CAP_READ, unix.CAP_LOOKUP, unix.CAP_WRITE})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err))
|
panic(fmt.Sprintf("CapRightsIsSet failed: %s %#v", err, err))
|
||||||
}
|
}
|
||||||
if b {
|
if b {
|
||||||
panic(fmt.Sprintf("Unexpected rights (2)"))
|
panic("Unexpected rights (2)")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Can no longer create a file
|
// Can no longer create a file
|
||||||
|
|||||||
Reference in New Issue
Block a user