From b6824c3ea42d1fcbc1299bf488e6398bbb5be606 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 13:37:36 -0700 Subject: Declare the repository variables' struct in place --- source/shared.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'source/shared.c') diff --git a/source/shared.c b/source/shared.c index 18de072..d159a7a 100644 --- a/source/shared.c +++ b/source/shared.c @@ -16,11 +16,6 @@ #define MAX_FIRST_LINE_READ (1024 * 64) -typedef struct { - const char *name; - const char *value; -} env_var; - struct cgit_repolist cgit_repolist; struct cgit_context ctx; char cgit_default_repo_desc[] = "[no description]"; @@ -490,7 +485,10 @@ void cgit_parse_date_format(const char *format, struct date_mode *mode) void cgit_prepare_repo_env(struct cgit_repo *repo) { - const env_var vars[] = { + const struct { + const char *name; + const char *value; + } vars[] = { { .name = "CGIT_REPO_URL", .value = repo->url }, { .name = "CGIT_REPO_NAME", .value = repo->name }, { .name = "CGIT_REPO_PATH", .value = repo->path }, -- cgit