Skip to content

Commit 0a1631d

Browse files
committed
Remove redundant if else
Signed-off-by: Philip Laine <[email protected]>
1 parent 73301df commit 0a1631d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pkg/git/libgit2/transport.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,7 @@ func (k knownKey) matches(host string, hostkey git2go.HostkeyCertificate) bool {
219219
return false
220220
}
221221
hasher.Write(k.key.Marshal())
222-
if bytes.Compare(hasher.Sum(nil), fingerprint) != 0 {
223-
return false
224-
}
225-
226-
return true
222+
return bytes.Compare(hasher.Sum(nil), fingerprint) == 0
227223
}
228224

229225
func containsHost(hosts []string, host string) bool {

0 commit comments

Comments
 (0)