From: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date: Sun, 8 May 2016 09:47:46 +0000 (+0700)
Subject: gpg-interface.c: use error_errno()
X-Git-Tag: v2.9.0-rc0~30^2~15
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddf362a2a9b6cf784497162d21556a950f99dce8;p=git

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>
---

diff --git a/gpg-interface.c b/gpg-interface.c
index 3dc2fe397e..20612fe501 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -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;