Commit be67f512d821d0bcc4f05a3f58e35d4146de5e7d

Calvin Buckley 2021-07-06T22:27:14

Fix wrong time_t used in function This function doesn't interoperate with any system functions that use the system time_t, but rather only works with the git_time_t type in libgit2, which could be a different width than the system one. Fixes a compile warning.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/date.c b/src/date.c
index f8594ed..71bf631 100644
--- a/src/date.c
+++ b/src/date.c
@@ -204,7 +204,7 @@ static int is_date(int year, int month, int day, struct tm *now_tm, time_t now, 
 	if (month > 0 && month < 13 && day > 0 && day < 32) {
 		struct tm check = *tm;
 		struct tm *r = (now_tm ? &check : tm);
-		time_t specified;
+		git_time_t specified;
 
 		r->tm_mon = month - 1;
 		r->tm_mday = day;