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

Re: svn commit: r14482 - in trunk/subversion: mod_dav_svn

From: Ben Collins-Sussman <sussman_at_tigris.org>
Date: 2005-05-10 14:25:42 CEST

On May 10, 2005, at 6:55 AM, Julian Foad wrote:

>>> Author: sussman
>>> Date: Wed Apr 27 14:42:27 2005
>>> New Revision: 14482
>>>
>>> Modified:
>>> trunk/subversion/libsvn_fs/fs-loader.c
>>> trunk/subversion/mod_dav_svn/lock.c
>>>
>>> Log:
>>> mod_dav_svn bugfix: prevent lock creation/expiration dates from
>>> overflowing.
>>> And don't a allow negative expiration date into svn_fs_lock().
>>>
>>> * subversion/mod_dav_svn/lock.c (svn_lock_to_dav_lock): divide
>>> 64-bit int by 1000 before casting to 32-bit.
>>> (dav_lock_to_svn_lock): cast to 64-bit int before mulitplying
>>> by 1000.
>>>
>
> Since when have there been 1000 microseconds in a second?
>

What the heck? We should be using APR_USEC_PER_SEC, right? I
thought it was 'milli' for some reason. Is this a big bug?

/** number of microseconds per second */
#define APR_USEC_PER_SEC APR_TIME_C(1000000)

/** @return apr_time_t as a second */
#define apr_time_sec(time) ((time) / APR_USEC_PER_SEC)

/** @return a second as an apr_time_t */
#define apr_time_from_sec(sec) ((apr_time_t)(sec) * APR_USEC_PER_SEC)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 10 14:27:42 2005

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.