fsck.c:fsck_commit(): use skip_prefix() to verify and skip constant
commit2d820a61dfd50d50cafab47f75a507f3e6657e9b
authorYuxuan Shui <yshuiv7@gmail.com>
Thu, 13 Mar 2014 04:45:51 +0000 (13 12:45 +0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Mar 2014 22:34:56 +0000 (19 15:34 -0700)
treef43faae9baa38e3b582f4db1f1cfa8cee225078d
parentde42180f6a645491c7ca8683ff2d5060f85f0c51
fsck.c:fsck_commit(): use skip_prefix() to verify and skip constant

fsck_commit() uses memcmp() to check if the buffer starts with a
certain prefix, and skips the prefix if it does.

This is exactly what skip_prefix() was designed for.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fsck.c