[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] sprintf elimination, take 2

From: Peter N. Lundblad <lundblad_at_softhome.net>
Date: 2004-05-13 00:00:13 CEST


Thank you for reviewing; here is a new variant of the patch.

On Wed, 12 May 2004, Tobias Ringström wrote:

> Peter N. Lundblad wrote:
> > On Wed, 12 May 2004, Erik Huelsmann wrote:
> >
> >>>On Tue, 11 May 2004, Peter N. Lundblad wrote:
> >>>
> >>>When doing this, I found some instances of plain sprintf into a
> >>>stack-allocated fixed-size buffer. Are they worth eliminating as per
> >>>HACKING? The buffer is 20 chars long, and I think that would be too short
> >>>if long int happens to be 64 bits on a platform.
> >>
> The patch looks fine (although I would get rid of the gcc warning
> workarounds in print_status by moving the variables and the two print

You're right. When looking once more, it was clear that that function
called for some reorganization...

> statements inside the if(detailed) clause). I wonder why you didn't
> change all sprintf's throughout the code, e.g. those in libsvn_repos/dump.c?
Did in that file too, now. NOw we just have sprintf in test cases (who
cares?), svndumpfilter/main.c (missing pool arguments) and utf.c and
path.c. The two last construct strings in place and carefully make sure
that enough space is allocated. I think extra allocation there is

Good night,

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Wed May 12 23:50:38 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.