]> gitweb.ps.run Git - ps-cgit/blobdiff - cgit.c
cgit.c: Remove parameter from guess_defbranch()
[ps-cgit] / cgit.c
diff --git a/cgit.c b/cgit.c
index 080725848d764af19363d2b922f4b949d8524a2f..2ccf8646a5e5867632b5dcf6b2e15cbacd16f9f1 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -315,7 +315,7 @@ static void querystring_cb(const char *name, const char *value)
                ctx.qry.name = xstrdup(value);
        } else if (!strcmp(name, "mimetype")) {
                ctx.qry.mimetype = xstrdup(value);
                ctx.qry.name = xstrdup(value);
        } else if (!strcmp(name, "mimetype")) {
                ctx.qry.mimetype = xstrdup(value);
-       } else if (!strcmp(name, "s")){
+       } else if (!strcmp(name, "s")) {
                ctx.qry.sort = xstrdup(value);
        } else if (!strcmp(name, "showmsg")) {
                ctx.qry.showmsg = atoi(value);
                ctx.qry.sort = xstrdup(value);
        } else if (!strcmp(name, "showmsg")) {
                ctx.qry.showmsg = atoi(value);
@@ -445,7 +445,7 @@ char *find_default_branch(struct cgit_repo *repo)
        return ref;
 }
 
        return ref;
 }
 
-static char *guess_defbranch(const char *repo_path)
+static char *guess_defbranch(void)
 {
        const char *ref;
        unsigned char sha1[20];
 {
        const char *ref;
        unsigned char sha1[20];
@@ -483,7 +483,7 @@ static int prepare_repo_cmd(struct cgit_context *ctx)
        ctx->page.title = fmt("%s - %s", ctx->repo->name, ctx->repo->desc);
 
        if (!ctx->repo->defbranch)
        ctx->page.title = fmt("%s - %s", ctx->repo->name, ctx->repo->desc);
 
        if (!ctx->repo->defbranch)
-               ctx->repo->defbranch = guess_defbranch(ctx->repo->path);
+               ctx->repo->defbranch = guess_defbranch();
 
        if (!ctx->qry.head) {
                ctx->qry.nohead = 1;
 
        if (!ctx->qry.head) {
                ctx->qry.nohead = 1;
@@ -653,7 +653,7 @@ void print_repolist(FILE *f, struct cgit_repolist *list, int start)
 {
        int i;
 
 {
        int i;
 
-       for(i = start; i < list->count; i++)
+       for (i = start; i < list->count; i++)
                print_repo(f, &list->repos[i]);
 }
 
                print_repo(f, &list->repos[i]);
 }