From 8725d4ccc0fcef59c8d9f0eaf606b3c6f962467a Mon Sep 17 00:00:00 2001 From: greatroar <61184462+greatroar@users.noreply.github.com> Date: Tue, 6 Apr 2021 20:33:53 +0200 Subject: [PATCH] Check for EINTR with != on Linux (#56) This way, ignoringEINTR becomes small enough for Go 1.16 to inline it. Co-authored-by: greatroar <@> --- xattr_linux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xattr_linux.go b/xattr_linux.go index de68d30..f4c7f35 100644 --- a/xattr_linux.go +++ b/xattr_linux.go @@ -3,7 +3,6 @@ package xattr import ( - "errors" "os" "syscall" @@ -31,7 +30,7 @@ const ( func ignoringEINTR(fn func() error) (err error) { for { err = fn() - if !errors.Is(err, unix.EINTR) { + if err != unix.EINTR { break } }