all repos — cgit @ 687cdf69689edcaff8e9035af93baf1a9e71cf32

a hyperfast web frontend for git written in c

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>
John Keeping john@keeping.me.uk
Thu, 08 Oct 2015 23:23:57 +0100
commit

687cdf69689edcaff8e9035af93baf1a9e71cf32

parent

94182d6031df0d956a94ecd7ece233e345468961

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M scan-tree.cscan-tree.c

@@ -174,7 +174,7 @@ }

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); }