From: Willem Toorop Date: Mon, 14 Mar 2011 14:41:25 +0000 (+0000) Subject: Fixed some minor typecasting errors for lint to pass X-Git-Tag: release-1.6.10rc1~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d4247e790acbde6a8880eea89c2cc6f083f4237;p=thirdparty%2Fldns.git Fixed some minor typecasting errors for lint to pass --- diff --git a/util.c b/util.c index 8a7fe2eb..8a4c3ffc 100644 --- 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);