Use !bytes.Equal instead of bytes.Compare !=0 to check for inequality

This commit is contained in:
Michael Eischer 2020-03-06 23:33:26 +01:00
parent 2f8335554c
commit 49b6aac3fa

View file

@ -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
}