aboutsummaryrefslogtreecommitdiffstats
path: root/models/ssh_key.go
diff options
context:
space:
mode:
authorOleg Kovalov <iamolegkovalov@gmail.com>2018-10-20 23:25:14 +0200
committertechknowlogick <hello@techknowlogick.com>2018-10-20 17:25:14 -0400
commit5a4648cdd697be92d33be55cd85069365cce2588 (patch)
tree0d246271e482d8d8ffb9f357861c0db5d698064f /models/ssh_key.go
parent583b1b84293635633199123ff759849fbd09f7f2 (diff)
downloadgitea-5a4648cdd697be92d33be55cd85069365cce2588.tar.gz
gitea-5a4648cdd697be92d33be55cd85069365cce2588.zip
Remove check for negative length (#5120)
Diffstat (limited to 'models/ssh_key.go')
-rw-r--r--models/ssh_key.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/ssh_key.go b/models/ssh_key.go
index c2836e6885..2592209b4d 100644
--- a/models/ssh_key.go
+++ b/models/ssh_key.go
@@ -376,7 +376,7 @@ func calcFingerprint(publicKeyContent string) (string, error) {
}
func addKey(e Engine, key *PublicKey) (err error) {
- if len(key.Fingerprint) <= 0 {
+ if len(key.Fingerprint) == 0 {
key.Fingerprint, err = calcFingerprint(key.Content)
if err != nil {
return err