Re: [PATCH v2 06/41] builtin/fetch.c: use error_errno()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

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

Both of these original had unwanted \n at the end, and the updated
one loses them, which is good.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]