From b1348fbfabb351987a0a65a9d193e2056580cf25 Mon Sep 17 00:00:00 2001 From: AZero13 Date: Mon, 19 May 2025 13:39:32 -0400 Subject: [PATCH] days should be a long type The difference in years is cast to a long and then multiplied by 365. The return value of the function is also a long. --- libarchive/archive_parse_date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libarchive/archive_parse_date.c b/libarchive/archive_parse_date.c index f907bf20a..cda0b11a5 100644 --- a/libarchive/archive_parse_date.c +++ b/libarchive/archive_parse_date.c @@ -928,7 +928,7 @@ difftm (struct tm *a, struct tm *b) { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1); - int days = ( + long days = ( /* difference in day of year */ a->tm_yday - b->tm_yday /* + intervening leap days */ -- 2.47.2