From 0a1631dc5a08e383e8d616cc06e375f408cd871f Mon Sep 17 00:00:00 2001 From: Philip Laine Date: Fri, 12 Feb 2021 11:18:27 +0100 Subject: [PATCH] Remove redundant if else Signed-off-by: Philip Laine --- pkg/git/libgit2/transport.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/git/libgit2/transport.go b/pkg/git/libgit2/transport.go index 9e50b628..f5327356 100644 --- a/pkg/git/libgit2/transport.go +++ b/pkg/git/libgit2/transport.go @@ -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 {