[ldns-users] Bug in ldns_year_and_yday_from_days_since_epoch (only on 32 bits)
Tom Hendrikx
tom at whyscream.net
Tue Dec 27 00:26:27 UTC 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 24-12-11 00:29, Miek Gieben wrote:
> [ Quoting <Willem at NLnetLabs.nl> at 00:17 on Dec 24 in "Re:
> [ldns-users] Bug..." ]
>> Index: util.c
>> ===================================================================
>>
>>
- --- util.c (revision 3625)
>> +++ util.c (working copy) @@ -256,10 +256,7 @@ int new_year;
>>
>> while (days < 0 || days >= (int64_t) (is_leap_year(year) ? 366 :
>> 365)) { - new_year = year + (int) LDNS_DIV(days, 366); - if
>> (year == new_year) { - year += days < 0 ? -1 : 1; - } +
>> new_year = year + (int) LDNS_DIV(days, 365); days -= (new_year -
>> year) * 365; days -= leap_days(year, new_year); year =
>> new_year;
>
> Looks OK. I can ask Tom to apply it locally and test it a little?
> (don't know if he's also on this list)
>
I am, but not during the holidays. Will test tomorrow ;)
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBCAAGBQJO+RCtAAoJEJPfMZ19VO/1GwsQALaLC3IL7WkPmpScQEbKppF9
JpILRIx9IpeNdf880nXDDPto+xuPDT5CpaH7YNLVFJISk15sjjfbfkq1KaBWJEjT
sxWCz/Uz1DOSh71YivYDiOZSDavnaWeTN1uiM1pjcDmRSEFuiXPCGX03rvidu4qW
OFzBuKdYIYvsRe8rkyv4wWZ6brFec0AU4viSa946p2h3NsOA5l8fL3BtLJMw6jNP
w+XQAaZsHwDZATINyH8vCbcYcfOY3p2zBBR1NdsVcsUKXoxBUfRj4H9+DxS13FFQ
yd8EOAWePT6hO2ezX7rSWWnaZCxH6hyF+XHbkjaNDt9vkbRjSAU/LC8ATg1AhW9P
YEmt8aNxF91EtYiy84jVWnQFq16kUJ6dwLXLkel4EMpoZAEj2UXq/z7lqFdDApVg
6sT4ox+V40c4Y1isOwGgXUGf/IoXWkVJdY9+i/ubi7p8Irqq7tWFuQ1TVOs7sSot
mHbqD6dl5cqNZYz8UNhUQh5W+89vYCFuKd9MhqjbBgLynwm6o92MmO8PlljY99XZ
d+dLyrV44kmlAFnYwA9JbwHZNLrIgMwR1+ug1NCW3pXGhSbcLxbuxjOMc1x8lpO+
Z5lR2vUraquJZyvG16rsYKIUsJ+ugZozkLav5Qd7fsUU7OYCxBhAshc//zmlk49R
qQbZmr6k4TRmnKe5FQ2d
=aRGR
-----END PGP SIGNATURE-----
More information about the ldns-users
mailing list