]> git.cameronkatri.com Git - cgit.git/blobdiff - shared.c
Update copyright headers to have latest dates.
[cgit.git] / shared.c
index 0add2e5df2e369e7ae1113bcdcd70985bcaf512b..0a0e22e7255b0db8b9446c496fa85b58d46e24aa 100644 (file)
--- a/shared.c
+++ b/shared.c
@@ -8,7 +8,6 @@
 
 #include "cgit.h"
 #include <stdio.h>
-#include <linux/limits.h>
 
 struct cgit_repolist cgit_repolist;
 struct cgit_context ctx;
@@ -56,7 +55,6 @@ struct cgit_repo *cgit_add_repo(const char *url)
        ret->desc = "[no description]";
        ret->owner = NULL;
        ret->section = ctx.cfg.section;
-       ret->defbranch = "master";
        ret->snapshots = ctx.cfg.snapshots;
        ret->enable_commit_graph = ctx.cfg.enable_commit_graph;
        ret->enable_log_filecount = ctx.cfg.enable_log_filecount;
@@ -394,7 +392,7 @@ void cgit_prepare_repo_env(struct cgit_repo * repo)
        p = env_vars;
        q = p + env_var_count;
        for (; p < q; p++)
-               if (setenv(p->name, p->value, 1))
+               if (p->value && setenv(p->name, p->value, 1))
                        fprintf(stderr, warn, p->name, p->value);
 }