summaryrefslogtreecommitdiff
path: root/builtin-fsck.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-fsck.c')
-rw-r--r--builtin-fsck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-fsck.c b/builtin-fsck.c
index 6da3814d59..6abf498d2b 100644
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
@@ -546,7 +546,7 @@ static int fsck_head_link(void)
if (!head_points_at || !(flag & REF_ISSYMREF))
return error("HEAD is not a symbolic ref");
- if (strncmp(head_points_at, "refs/heads/", 11))
+ if (prefixcmp(head_points_at, "refs/heads/"))
return error("HEAD points to something strange (%s)",
head_points_at);
if (is_null_sha1(sha1))