提交 b20a60d0 编写于 作者: C Christian Couder 提交者: Junio C Hamano

diff.c: add "const" qualifier to "char *cmd" member of "struct ll_diff_driver"

Also use "git_config_string" to simplify code where "cmd" is set.
Signed-off-by: NChristian Couder <chriscool@tuxfamily.org>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 dfb068be
......@@ -57,7 +57,7 @@ static int parse_diff_color_slot(const char *var, int ofs)
static struct ll_diff_driver {
const char *name;
struct ll_diff_driver *next;
char *cmd;
const char *cmd;
} *user_diff, **user_diff_tail;
/*
......@@ -86,10 +86,7 @@ static int parse_lldiff_command(const char *var, const char *ep, const char *val
user_diff_tail = &(drv->next);
}
if (!value)
return config_error_nonbool(var);
drv->cmd = xstrdup(value);
return 0;
return git_config_string(&(drv->cmd), var, value);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册