summaryrefslogtreecommitdiffstats
path: root/routers/user
diff options
context:
space:
mode:
authorChristian Muehlhaeuser <muesli@gmail.com>2019-07-22 11:35:54 +0200
committerLunny Xiao <xiaolunwen@gmail.com>2019-07-22 17:35:53 +0800
commitb0cd3b8ab9b174f11fd4db8737106be5caf9cc1c (patch)
tree357b210567a95a33667e9441062584abdd799951 /routers/user
parent9a965035f0e485b2f4b69b76441949c264499c2b (diff)
downloadgitea-b0cd3b8ab9b174f11fd4db8737106be5caf9cc1c.tar.gz
gitea-b0cd3b8ab9b174f11fd4db8737106be5caf9cc1c.zip
Fixed ineffectual assignments (#7555)
Don't assign values we never use.
Diffstat (limited to 'routers/user')
-rw-r--r--routers/user/setting/security_twofa.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/routers/user/setting/security_twofa.go b/routers/user/setting/security_twofa.go
index 6e3516dbba..5aa951a9ba 100644
--- a/routers/user/setting/security_twofa.go
+++ b/routers/user/setting/security_twofa.go
@@ -81,7 +81,6 @@ func twofaGenerateSecretAndQr(ctx *context.Context) bool {
// Filter unsafe character ':' in issuer
issuer := strings.Replace(setting.AppName+" ("+setting.Domain+")", ":", "", -1)
if otpKey == nil {
- err = nil // clear the error, in case the URL was invalid
otpKey, err = totp.Generate(totp.GenerateOpts{
SecretSize: 40,
Issuer: issuer,