]> git.cameronkatri.com Git - cgit.git/commitdiff
cgit.c: remove useless null check
authorJohn Keeping <john@keeping.me.uk>
Thu, 8 Oct 2015 22:23:56 +0000 (23:23 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Fri, 9 Oct 2015 08:54:19 +0000 (10:54 +0200)
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>
cgit.c

diff --git a/cgit.c b/cgit.c
index 28a2f149c6cd41d8c113acf4d6e9db254a82685f..5937b9e503d8f8642692196385ae705fa59b371c 100644 (file)
--- 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);