[PATCH v3 06/41] builtin/fetch.c: use error_errno()
- From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
- Date
- May 8, 2016, 09:47 UTC
- Message-ID
- <1462700881-25108-7-git-send-email-pclouds@gmail.com>
- In-Reply-To
- <1462700881-25108-1-git-send-email-pclouds@gmail.com>
A couple of newlines are also removed, because both error() and error_errno() automatically append a newline.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> --- builtin/fetch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/fetch.c b/builtin/fetch.c index f8455bd..1582ca7 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -607,7 +607,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name, fp = fopen(filename, "a"); if (!fp) - return error(_("cannot open %s: %s\n"), filename, strerror(errno)); + return error_errno(_("cannot open %s"), filename); if (raw_url) url = transport_anonymize_url(raw_url); @@ -848,7 +848,7 @@ static int truncate_fetch_head(void) FILE *fp = fopen_for_writing(filename); if (!fp) - return error(_("cannot open %s: %s\n"), filename, strerror(errno)); + return error_errno(_("cannot open %s"), filename); fclose(fp); return 0; }
-- 2.8.0.rc0.210.gd302cd2