From: John Keeping Date: Sun, 16 Feb 2014 16:06:02 +0000 (+0000) Subject: notes-utils: handle boolean notes.rewritemode correctly X-Git-Tag: v2.0.0-rc0~130^2~4 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/aa012e906542dbc533dbc5bafe1c4e0a47bdc59e notes-utils: handle boolean notes.rewritemode correctly If we carry on after outputting config_error_nonbool then we're guaranteed to dereference a null pointer. Signed-off-by: John Keeping Signed-off-by: Junio C Hamano --- diff --git a/notes-utils.c b/notes-utils.c index 2975dcd581..4aa7023903 100644 --- a/notes-utils.c +++ b/notes-utils.c @@ -75,7 +75,7 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb) return 0; } else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) { if (!v) - config_error_nonbool(k); + return config_error_nonbool(k); c->combine = parse_combine_notes_fn(v); if (!c->combine) { error(_("Bad notes.rewriteMode value: '%s'"), v);