You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Scott Ananian" <ca...@lesser-magoo.lcs.mit.edu> on 2001/09/19 01:12:44 UTC
Re: [SVN-DEV] Re: [RESUBMIT] [PATCH] svn_parse_date rewrite (issue #408)
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
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [SVN-DEV] Re: [RESUBMIT] [PATCH] svn_parse_date rewrite (issue #408)
Posted by Branko Čibej <br...@xbc.nu>.
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 <br...@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