diff options
| -rw-r--r-- | ui-summary.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui-summary.c b/ui-summary.c index 00a5dd5..57182e3 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -162,6 +162,7 @@ static int get_readme_oid_cb(const struct object_id *oid, struct strbuf *base, struct get_readme_oid_ctx *ctx = (struct get_readme_oid_ctx*)cbdata; // TODO: make readme.md configurable + const size_t readme_names_count = 2; const char **readme_names = (const char*[]){"readme.md", "readme"}; struct strbuf buffer = STRBUF_INIT; @@ -184,7 +185,7 @@ static int get_readme_oid_cb(const struct object_id *oid, struct strbuf *base, strbuf_release(&buffer); - for (int i = 0; i < sizeof(readme_names)/sizeof(*readme_names); i++) { + for (int i = 0; i < readme_names_count; i++) { if (match_base && strcasecmp(pathname, readme_names[i]) == 0) { *(ctx->oid) = *oid; *(ctx->filename) = xstrdup(pathname); |
