Re: [PATCH v2] diff -c -p: do not die on submodules
- From
Finn Arne Gangstad <finnag@pvv.org>
- Date
- Apr 30, 2009, 06:07 UTC
- Message-ID
- <20090430060731.GA4106@pvv.org>
- In-Reply-To
- <81b0412b0904292247tdcf515bs67f809b559ac2504@mail.gmail.com>
On Thu, Apr 30, 2009 at 07:47:57AM +0200, Alex Riesen wrote:
Show 17 quoted lines
> 2009/4/30 Johannes Schindelin <Johannes.Schindelin@gmx.de>: > > On Thu, 30 Apr 2009, Alex Riesen wrote: > >> http://www.google.com/search?q=snprintf+negative+return+value > >> > >> First link: http://bytes.com/groups/c/590845-snprintf-return-value > >> > >> Look for "(Windows, mingw)" > > > > No, I will not. > > > > "The following are the results from different systems: > gcc 3.3 (Mac OS X): 10 > gcc 3.4.5 (Windows, mingw): -1 > BC++ 5.5.1 (Windows): 10 > MS VC++ 6.0 and 2005 (Windows, _snprintf() used): -1 > DigitalMars 8.42n (Windows): -1"
snprintf always (on all these arechitectures) returns the number of characters written if the buffer is large enough. In the code we are discussing here the buffer is always large enough, so this is not a problem.
- Finn Arne