Remove redundant if else

Signed-off-by: Philip Laine <philip.laine@gmail.com>
This commit is contained in:
Philip Laine 2021-02-12 11:18:27 +01:00
parent 73301df023
commit 0a1631dc5a
1 changed files with 1 additions and 5 deletions

View File

@ -219,11 +219,7 @@ func (k knownKey) matches(host string, hostkey git2go.HostkeyCertificate) bool {
return false
}
hasher.Write(k.key.Marshal())
if bytes.Compare(hasher.Sum(nil), fingerprint) != 0 {
return false
}
return true
return bytes.Compare(hasher.Sum(nil), fingerprint) == 0
}
func containsHost(hosts []string, host string) bool {