diff --git a/sha1_file.c b/sha1_file.c
index 51e07d5a45b6740c53bfc7d4b6b11d3f66e07f6e..18dece46b1e248a4e52e9ead3bf172ed6ab78236 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
#endif
#endif
-const unsigned char null_sha1[20] = { 0, };
+const unsigned char null_sha1[20];
static unsigned int sha1_file_open_flag = O_NOATIME;
int namelen = strlen(de->d_name);
struct packed_git *p;
- if (strcmp(de->d_name + namelen - 4, ".idx"))
+ if (!has_extension(de->d_name, ".idx"))
continue;
/* we have .idx. Is it a file we can map? */