From 49b6aac3fa9e1c4de24095c05a8fbb9234cf9f82 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Fri, 6 Mar 2020 23:33:26 +0100 Subject: [PATCH] Use !bytes.Equal instead of bytes.Compare !=0 to check for inequality --- cmd/restic/exclude.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/restic/exclude.go b/cmd/restic/exclude.go index e2c386f24..2e5349611 100644 --- a/cmd/restic/exclude.go +++ b/cmd/restic/exclude.go @@ -190,7 +190,7 @@ func isDirExcludedByFile(dir, tagFilename, header string) bool { Warnf("could not read signature from exclusion tagfile %q: %v\n", tf, err) return false } - if bytes.Compare(buf, []byte(header)) != 0 { + if !bytes.Equal(buf, []byte(header)) { Warnf("invalid signature in exclusion tagfile %q\n", tf) return false }