neocgit

a more 'modern' version of cgit
Log | Files | Refs | Submodules | README | LICENSE | git clone https://git.ne02ptzero.me/git/neocgit

commit 687cdf69689edcaff8e9035af93baf1a9e71cf32
parent 94182d6031df0d956a94ecd7ece233e345468961
Author: John Keeping <john@keeping.me.uk>
Date:   Thu,  8 Oct 2015 23:23:57 +0100

scan-tree: remove useless strdup()

parse_configfile() takes a "const char *" and doesn't hold any
references to it after it returns; there is no reason to pass it a
duplicate.

Coverity-id: 13941
Signed-off-by: John Keeping <john@keeping.me.uk>

Diffstat:
Mscan-tree.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scan-tree.c b/scan-tree.c @@ -174,7 +174,7 @@ static void add_repo(const char *base, struct strbuf *path, repo_config_fn fn) strbuf_addstr(path, "cgitrc"); if (!stat(path->buf, &st)) - parse_configfile(xstrdup(path->buf), &repo_config); + parse_configfile(path->buf, &repo_config); strbuf_release(&rel); }