[PATCH 1/4] cgit.c: remove useless null check
John Keeping
john at keeping.me.uk
Fri Oct 9 00:23:56 CEST 2015
Everywhere else in this function we do not check whether the value is
null and parse_configfile() never passes a null value to this callback.
Coverity-id: 13846
Signed-off-by: John Keeping <john at keeping.me.uk>
---
cgit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cgit.c b/cgit.c
index 28a2f14..5937b9e 100644
--- a/cgit.c
+++ b/cgit.c
@@ -110,7 +110,7 @@ static void config_cb(const char *name, const char *value)
ctx.repo->path = trim_end(value, '/');
else if (ctx.repo && starts_with(name, "repo."))
repo_config(ctx.repo, name + 5, value);
- else if (!strcmp(name, "readme") && value != NULL)
+ else if (!strcmp(name, "readme"))
string_list_append(&ctx.cfg.readme, xstrdup(value));
else if (!strcmp(name, "root-title"))
ctx.cfg.root_title = xstrdup(value);
--
1.7.9.5
More information about the CGit
mailing list