Re: [PATCH 1/5] notes-utils: handle boolean notes.rewritemode correctly

2014-02-18 Thread David Kastrup
Jeff King p...@peff.net writes: On Sun, Feb 16, 2014 at 05:22:45PM +0100, David Kastrup wrote: config.c:#undef config_error_nonbool config.c:int config_error_nonbool(const char *var) You could always look in the commit history: $ git log -S'#define config_error_nonbool' cache.h or

Re: [PATCH 1/5] notes-utils: handle boolean notes.rewritemode correctly

2014-02-18 Thread Jeff King
On Tue, Feb 18, 2014 at 09:41:51AM +0100, David Kastrup wrote: gcc's flow analysis works with the same data as humans reading the code. If there is no information content in the function call, it makes more sense to either making it void. The point of error() returning a constant -1 is to

Re: [PATCH 1/5] notes-utils: handle boolean notes.rewritemode correctly

2014-02-18 Thread David Kastrup
Jeff King p...@peff.net writes: On Tue, Feb 18, 2014 at 09:41:51AM +0100, David Kastrup wrote: gcc's flow analysis works with the same data as humans reading the code. If there is no information content in the function call, it makes more sense to either making it void. The point of

Re: [PATCH 1/5] notes-utils: handle boolean notes.rewritemode correctly

2014-02-17 Thread Jeff King
On Sun, Feb 16, 2014 at 05:22:45PM +0100, David Kastrup wrote: Not really relevant to this patch, but looking at the output of git grep config_error_nonbool seems like a serious amount of ridiculousness going on. The header shows cache.h:extern int config_error_nonbool(const char *);

[PATCH 1/5] notes-utils: handle boolean notes.rewritemode correctly

2014-02-16 Thread John Keeping
If we carry on after outputting config_error_nonbool then we're guaranteed to dereference a null pointer. Signed-off-by: John Keeping j...@keeping.me.uk --- notes-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes-utils.c b/notes-utils.c index 2975dcd..4aa7023

Re: [PATCH 1/5] notes-utils: handle boolean notes.rewritemode correctly

2014-02-16 Thread David Kastrup
John Keeping j...@keeping.me.uk writes: If we carry on after outputting config_error_nonbool then we're guaranteed to dereference a null pointer. Not really relevant to this patch, but looking at the output of git grep config_error_nonbool seems like a serious amount of ridiculousness going