diff --git a/builtin-fsck.c b/builtin-fsck.c
index 6da3814d59a2c04cbcc9853035f5d72c0a3a4928..6abf498d2b391c97e9efcdb32da1cf3b5d566397 100644 (file)
--- a/builtin-fsck.c
+++ b/builtin-fsck.c
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))