Re: [PATCH] Improved error messages when temporary file creation fails
- From
Jonathan Nieder <jrnieder@gmail.com>
- Date
- Dec 8, 2010, 00:12 UTC
- Message-ID
- <20101208001236.GA25527@burratino>
- In-Reply-To
- <idmhjl$n1j$1@dough.gmane.org>
Jakub Narebski wrote:
> Arnout Engelen wrote: >> On Tue, Dec 07, 2010 at 12:56:17PM -0800, Junio C Hamano wrote:
>>>> + char origtemplate[255]; >>>> + strlcpy(origtemplate, template, 255); >>> >>> Why "255"?
[...]
> Why not use PATH_MAX instead of 255?
The advantage I can see to 256 is a small speed-up in the "no errors" code path. Since the I/O would tend to be much more costly and PATH_MAX is self explanatory, using PATH_MAX does seem cleaner.
I know you all are aware of this already; just thought I'd mention it while forwarding the original message to Arnout. :)
Jonathan