Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
diff.c: add "const" qualifier to "char *cmd" member of "struct ll_diff_driver"
author
Christian Couder
<chriscool@tuxfamily.org>
Sat, 16 Feb 2008 05:02:17 +0000
(06:02 +0100)
committer
Junio C Hamano
<gitster@pobox.com>
Sat, 16 Feb 2008 05:24:54 +0000
(21:24 -0800)
Also use "git_config_string" to simplify code where "cmd" is set.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
dfb068b
)
diff --git
a/diff.c
b/diff.c
index ed41ce418ee88894f9a3870a1c59eef8ee7baf31..f082f55bc524dae92c8d57fe0dc9e9c8e3f2d59a 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-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;
static struct ll_diff_driver {
const char *name;
struct ll_diff_driver *next;
- char *cmd;
+ c
onst c
har *cmd;
} *user_diff, **user_diff_tail;
/*
} *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);
}
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);
}
/*
}
/*