all repos — cgit @ 94182d6031df0d956a94ecd7ece233e345468961

a hyperfast web frontend for git written in c

cgit.c: remove useless null check

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@keeping.me.uk>
John Keeping john@keeping.me.uk
Thu, 08 Oct 2015 23:23:56 +0100
commit

94182d6031df0d956a94ecd7ece233e345468961

parent

978ce8c00c0d3117f6470a77b08aa0f97984604f

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M cgit.ccgit.c

@@ -110,7 +110,7 @@ else if (ctx.repo && !strcmp(name, "repo.path"))

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);