diff options
author | John Keeping | 2015-10-08 23:23:56 +0100 |
---|---|---|
committer | Jason A. Donenfeld | 2015-10-09 10:54:19 +0200 |
commit | 94182d6031df0d956a94ecd7ece233e345468961 (patch) | |
tree | a3c8a484c5120038444175aa085006b39ee030f6 /cgit.c | |
parent | 978ce8c00c0d3117f6470a77b08aa0f97984604f (diff) | |
download | cgit-94182d6031df0d956a94ecd7ece233e345468961.tar.gz cgit-94182d6031df0d956a94ecd7ece233e345468961.tar.bz2 cgit-94182d6031df0d956a94ecd7ece233e345468961.zip |
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>
Diffstat (limited to 'cgit.c')
-rw-r--r-- | cgit.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -110,7 +110,7 @@ static void config_cb(const char *name, const char *value) | |||
110 | ctx.repo->path = trim_end(value, '/'); | 110 | ctx.repo->path = trim_end(value, '/'); |
111 | else if (ctx.repo && starts_with(name, "repo.")) | 111 | else if (ctx.repo && starts_with(name, "repo.")) |
112 | repo_config(ctx.repo, name + 5, value); | 112 | repo_config(ctx.repo, name + 5, value); |
113 | else if (!strcmp(name, "readme") && value != NULL) | 113 | else if (!strcmp(name, "readme")) |
114 | string_list_append(&ctx.cfg.readme, xstrdup(value)); | 114 | string_list_append(&ctx.cfg.readme, xstrdup(value)); |
115 | else if (!strcmp(name, "root-title")) | 115 | else if (!strcmp(name, "root-title")) |
116 | ctx.cfg.root_title = xstrdup(value); | 116 | ctx.cfg.root_title = xstrdup(value); |