about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohn Keeping <john@keeping.me.uk>2015-10-08 23:23:56 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2015-10-09 10:54:19 +0200
commit94182d6031df0d956a94ecd7ece233e345468961 (patch)
treea3c8a484c5120038444175aa085006b39ee030f6
parentgit: update to v2.6.1 (diff)
downloadcgit-pink-94182d6031df0d956a94ecd7ece233e345468961.tar.gz
cgit-pink-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>
-rw-r--r--cgit.c2
1 files changed, 1 insertions, 1 deletions
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);
/tr> 2017-05-01Fix prune script loopJune McEnroe For loop was getting one string with several paths separated by newlines. 2017-05-01Fix prune scriptJune McEnroe The for loop was overriding zsh's $path variable, causing it to not be able to find rm. 2017-05-01Clean up SSH configJune McEnroe 2017-05-01Rename colorscheme "trivial"June McEnroe 2017-05-01Update vendored pathogenJune McEnroe 2017-05-01Clean up git configJune McEnroe 2017-05-01Clean up style in xxJune McEnroe 2017-05-01Clean up style in pbdJune McEnroe 2017-05-01Use EX_OK in pbcopyJune McEnroe 2017-04-30Clean up clockJune McEnroe 2017-04-30Clean up error strings in briJune McEnroe 2017-03-18Add -u option to xxJune McEnroe 2017-03-15Fix non-string-literal-format-string in briJune McEnroe 2017-03-15Fix bri compilationJune McEnroe cc will remove the file itself just fine. Always exit in case any of the shell commands fail. 2017-03-15Use psvar for title settingJune McEnroe Prevents prompt expansion from happening on the command being run when it is set in the title. 2017-03-14Add bri brightness control scriptJune McEnroe This is probably terrible. 2017-03-14Add comment to tmux terminal overrideJune McEnroe 2017-03-13Have tmux set block cursor on linux consoleJune McEnroe 2017-03-13Use inverse for Visual in colorschemeJune McEnroe