convert.c: guard config parser from value=NULL

filter.*.smudge and filter.*.clean configuration variables expect a
string value.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano 2008-02-11 10:53:36 -08:00
parent c64b9ad0fc
commit a7269e5cb7

View File

@ -326,14 +326,14 @@ static int read_convert_config(const char *var, const char *value)
if (!strcmp("smudge", ep)) {
if (!value)
return error("%s: lacks value", var);
return config_error_nonbool(var);
drv->smudge = strdup(value);
return 0;
}
if (!strcmp("clean", ep)) {
if (!value)
return error("%s: lacks value", var);
return config_error_nonbool(var);
drv->clean = strdup(value);
return 0;
}