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 <john@keeping.me.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>

John Keeping committed Feb 16, 2014 at 16:06 UTC aa012e906542dbc533dbc5bafe1c4e0a47bdc59e
1 file changed +1 -1
notes-utils.c
+1 -1
@@ -75,7 +75,7 @@ static int notes_rewrite_config(const char *k, const char *v, void *cb)
75 return 0;
76 } else if (!c->mode_from_env && !strcmp(k, "notes.rewritemode")) {
77 if (!v)
78 - config_error_nonbool(k);
78 + return config_error_nonbool(k);
79 c->combine = parse_combine_notes_fn(v);
80 if (!c->combine) {
81 error(_("Bad notes.rewriteMode value: '%s'"), v);