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

Re: [PATCH] Fix format of strlen() data in the new transactionless reporter.

From: Branko Cibej <brane_at_xbc.nu>
Date: 2004-03-02 11:54:12 CET

Quoting Ben Reser <ben@reser.org>:

> [[[
> strlen returns size_t which can be a long on some platforms. So using
> %d as the format is wrong. Use APR_SIZE_T_FMT instead. On all
> platforms apr_size_t is just a size_t so the format should be correct.

(And on platforms that don#t have size_t -- if any such still
exist -- I'd consider it a bug if APR chose anything but 'int'
for apr_size_t...)

> * subversion/libsvn_repos/reporter.c
> (write_path_info): Use the correct format for the size_t returned from
> strlen.
>
> ]]]

+1.

BTW, Is this the only place in our code where we strlen in a printf?

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 2 11:53:26 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.