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>maint
parent
c64b9ad0fc
commit
a7269e5cb7
|
@ -326,14 +326,14 @@ static int read_convert_config(const char *var, const char *value)
|
||||||
|
|
||||||
if (!strcmp("smudge", ep)) {
|
if (!strcmp("smudge", ep)) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return error("%s: lacks value", var);
|
return config_error_nonbool(var);
|
||||||
drv->smudge = strdup(value);
|
drv->smudge = strdup(value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp("clean", ep)) {
|
if (!strcmp("clean", ep)) {
|
||||||
if (!value)
|
if (!value)
|
||||||
return error("%s: lacks value", var);
|
return config_error_nonbool(var);
|
||||||
drv->clean = strdup(value);
|
drv->clean = strdup(value);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue