diff --git a/commit.c b/commit.c
index aa3b35b6a86891ac9d0628e20a6a46d506bf7700..a47fb4da271beaf5595b6bbbe41f94bad08f404d 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;