mirror of
https://git.zx2c4.com/cgit
synced 2024-11-26 02:18:42 +00:00
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>
This commit is contained in:
parent
978ce8c00c
commit
94182d6031
2
cgit.c
2
cgit.c
@ -110,7 +110,7 @@ static void config_cb(const char *name, const char *value)
|
|||||||
ctx.repo->path = trim_end(value, '/');
|
ctx.repo->path = trim_end(value, '/');
|
||||||
else if (ctx.repo && starts_with(name, "repo."))
|
else if (ctx.repo && starts_with(name, "repo."))
|
||||||
repo_config(ctx.repo, name + 5, value);
|
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));
|
string_list_append(&ctx.cfg.readme, xstrdup(value));
|
||||||
else if (!strcmp(name, "root-title"))
|
else if (!strcmp(name, "root-title"))
|
||||||
ctx.cfg.root_title = xstrdup(value);
|
ctx.cfg.root_title = xstrdup(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user