]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fixed some minor typecasting errors for lint to pass
authorWillem Toorop <willem@NLnetLabs.nl>
Mon, 14 Mar 2011 14:41:25 +0000 (14:41 +0000)
committerWillem Toorop <willem@NLnetLabs.nl>
Mon, 14 Mar 2011 14:41:25 +0000 (14:41 +0000)
util.c

diff --git a/util.c b/util.c
index 8a7fe2ebdc66e02c2b46cef912594d9c4c57cb08..8a4c3ffc9251b61eddd2062f05ba59c586704d47 100644 (file)
--- a/util.c
+++ b/util.c
@@ -244,7 +244,7 @@ mktime_from_utc(const struct tm *tm)
 #if SIZEOF_TIME_T <= 4
 
 void
-year_and_yday_from_days_since_epoch(int days, struct tm *result)
+year_and_yday_from_days_since_epoch(int64_t days, struct tm *result)
 {
        int year = 1970;
        int new_year;
@@ -297,13 +297,13 @@ wday_from_year_and_yday(struct tm *result)
 struct tm *
 ldns_gmtime64_r(int64_t clock, struct tm *result)
 {
-       result->tm_isdst =          0;
-       result->tm_sec   = clock % 60;
-       clock           /=         60;
-       result->tm_min   = clock % 60;
-       clock           /=         60;
-       result->tm_hour  = clock % 24;
-       clock           /=         24;
+       result->tm_isdst =                 0;
+       result->tm_sec   = (int) (clock % 60);
+       clock           /=                60;
+       result->tm_min   = (int) (clock % 60);
+       clock           /=                60;
+       result->tm_hour  = (int) (clock % 24);
+       clock           /=                24;
 
        year_and_yday_from_days_since_epoch(clock, result);
        mon_and_mday_from_year_and_yday(result);