Skip to content

Commit f482694

Browse files
authored
Merge pull request #203 from kolyshkin/rm-unix-nolint
Remove nolint annotations for unix errno comparisons
2 parents a75fad8 + 5ab22c5 commit f482694

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

go-selinux/selinux_linux.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func verifySELinuxfsMount(mnt string) bool {
132132
if err == nil {
133133
break
134134
}
135-
if err == unix.EAGAIN || err == unix.EINTR { //nolint:errorlint // unix errors are bare
135+
if err == unix.EAGAIN || err == unix.EINTR {
136136
continue
137137
}
138138
return false
@@ -263,7 +263,7 @@ func isProcHandle(fh *os.File) error {
263263
if err == nil {
264264
break
265265
}
266-
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
266+
if err != unix.EINTR {
267267
return &os.PathError{Op: "fstatfs", Path: fh.Name(), Err: err}
268268
}
269269
}
@@ -328,7 +328,7 @@ func lSetFileLabel(fpath string, label string) error {
328328
if err == nil {
329329
break
330330
}
331-
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
331+
if err != unix.EINTR {
332332
return &os.PathError{Op: "lsetxattr", Path: fpath, Err: err}
333333
}
334334
}
@@ -347,7 +347,7 @@ func setFileLabel(fpath string, label string) error {
347347
if err == nil {
348348
break
349349
}
350-
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
350+
if err != unix.EINTR {
351351
return &os.PathError{Op: "setxattr", Path: fpath, Err: err}
352352
}
353353
}

go-selinux/xattrs_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func lgetxattr(path, attr string) ([]byte, error) {
3131
func doLgetxattr(path, attr string, dest []byte) (int, error) {
3232
for {
3333
sz, err := unix.Lgetxattr(path, attr, dest)
34-
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
34+
if err != unix.EINTR {
3535
return sz, err
3636
}
3737
}
@@ -64,7 +64,7 @@ func getxattr(path, attr string) ([]byte, error) {
6464
func dogetxattr(path, attr string, dest []byte) (int, error) {
6565
for {
6666
sz, err := unix.Getxattr(path, attr, dest)
67-
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
67+
if err != unix.EINTR {
6868
return sz, err
6969
}
7070
}

0 commit comments

Comments
 (0)