mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 09:31:53 +01:00 
			
		
		
		
	Fixed ineffectual assignments (#7555)
Don't assign values we never use.
This commit is contained in:
		
							parent
							
								
									9a965035f0
								
							
						
					
					
						commit
						b0cd3b8ab9
					
				| @ -543,7 +543,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D | ||||
| 
 | ||||
| 		// Get new file. | ||||
| 		if strings.HasPrefix(line, cmdDiffHead) { | ||||
| 			middle := -1 | ||||
| 			var middle int | ||||
| 
 | ||||
| 			// Note: In case file name is surrounded by double quotes (it happens only in git-shell). | ||||
| 			// e.g. diff --git "a/xxx" "b/xxx" | ||||
|  | ||||
| @ -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, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user