[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

From: Tobias Ringström <tobias_at_ringstrom.mine.nu>
Date: 2004-05-12 21:59:19 CEST

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.
>>
>>Probably. In case you have to change function signatures to achieve this, I
>>don't think it is worth the trouble though. In those cases adding a #
>>comment saying that as soon as the signature changes the sprintf has to be
>>changed too.
>
> Here we go for more trialia...

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
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?

/Tobias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 12 21:59:45 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.