diff --git a/commit.c b/commit.c
index f69525a089de906f76046952824f5ba5c73f3537..e2bcbe814936989e7a86018e46ed6ca86f4c1f10 100644 (file)
--- a/commit.c
+++ b/commit.c
static unsigned long parse_commit_date(const char *buf, const char *tail)
{
- unsigned long date;
const char *dateptr;
if (buf + 6 >= tail)
if (buf >= tail)
return 0;
/* dateptr < buf && buf[-1] == '\n', so strtoul will stop at buf-1 */
- date = strtoul(dateptr, NULL, 10);
- if (date == ULONG_MAX)
- date = 0;
- return date;
+ return strtoul(dateptr, NULL, 10);
}
static struct commit_graft **commit_graft;