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

Re: [SVN-DEV] Re: [RESUBMIT] [PATCH] svn_parse_date rewrite (issue #408)

From: Branko Èibej <brane_at_xbc.nu>
Date: 2001-09-19 20:57:08 CEST

C. Scott Ananian wrote:

>On Wed, 19 Sep 2001, Branko [ISO-8859-2] �ibej wrote:
>
>>Why are you using apr_int64_t for years, days and hours in normalize_time()?
>>
>
>can't hurt, can it? =)
>
>years is definitely questionable, but a 64-bit quantity for seconds
>definitely leads to the possibility of overflow from 32-bit days and hours
>variables. Not that it will happen while humans remain on the earth, but
>that's the reason. I was trying to remain faithful to the spirit of the
>64-bit apr_time_t.
> --s
>

Yes, but the *problem* is that the fields in apr_exploded_time_t are
ints, and I'm getting conversion warnings. And I don't want to see a
cast in there.

You're parsing a date string, remember? That means your initial
assumption is that the date is well-formed. If somebody passes in
12:31:67, you should return an error, not normalize to 12:32:07.

-- 
Brane �ibej   <brane_at_xbc.nu>            http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:42 2006

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.