gpg-interface.c: use error_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		
				
					committed by
					
						
						Junio C Hamano
					
				
			
			
				
	
			
			
			
						parent
						
							6c223e4958
						
					
				
				
					commit
					ddf362a2a9
				
			@ -219,11 +219,9 @@ int verify_signed_buffer(const char *payload, size_t payload_size,
 | 
			
		||||
	args_gpg[0] = gpg_program;
 | 
			
		||||
	fd = git_mkstemp(path, PATH_MAX, ".git_vtag_tmpXXXXXX");
 | 
			
		||||
	if (fd < 0)
 | 
			
		||||
		return error(_("could not create temporary file '%s': %s"),
 | 
			
		||||
			     path, strerror(errno));
 | 
			
		||||
		return error_errno(_("could not create temporary file '%s'"), path);
 | 
			
		||||
	if (write_in_full(fd, signature, signature_size) < 0)
 | 
			
		||||
		return error(_("failed writing detached signature to '%s': %s"),
 | 
			
		||||
			     path, strerror(errno));
 | 
			
		||||
		return error_errno(_("failed writing detached signature to '%s'"), path);
 | 
			
		||||
	close(fd);
 | 
			
		||||
 | 
			
		||||
	gpg.argv = args_gpg;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user