summaryrefslogtreecommitdiff
path: root/builtin-tag.c
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2008-07-06 04:10:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-06 06:31:09 (GMT)
commitc96a6d36608166f2e1b74e639b34bb5ae8932683 (patch)
treeaf4dd761e47b9aaae142e1961ac78f43d5e16614 /builtin-tag.c
parent08b51f51e6a4cf2f5ad4b893707f1337a450e499 (diff)
downloadgit-c96a6d36608166f2e1b74e639b34bb5ae8932683.zip
git-c96a6d36608166f2e1b74e639b34bb5ae8932683.tar.gz
git-c96a6d36608166f2e1b74e639b34bb5ae8932683.tar.bz2
Fix "config_error_nonbool" used with value instead of key
The function "config_error_nonbool", that is defined in "config.c", is used to report an error when a config key in the config file should have a corresponding value but it hasn't. So the parameter to this function should be the key and not the value, because the value is undefined. And it could crash if the value is used. This patches fixes two occurences where the value was passed instead of the key. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-tag.c')
-rw-r--r--builtin-tag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin-tag.c b/builtin-tag.c
index e675206..3c97c69 100644
--- a/builtin-tag.c
+++ b/builtin-tag.c
@@ -260,7 +260,7 @@ static int git_tag_config(const char *var, const char *value, void *cb)
{
if (!strcmp(var, "user.signingkey")) {
if (!value)
- return config_error_nonbool(value);
+ return config_error_nonbool(var);
set_signingkey(value);
return 0;
}