Re: [PATCH] Fix detection of uname failure

2015-07-17 Thread Johannes Schindelin
Hi Charles, On 2015-07-17 14:11, Charles Bailey wrote: diff --git a/dir.c b/dir.c index 8209f8b..52dbfd0 100644 --- a/dir.c +++ b/dir.c @@ -1848,7 +1848,7 @@ static const char *get_ident_string(void) if (sb.len) return sb.buf; - if (uname(uts)) + if

Re: [PATCH] Fix detection of uname failure

2015-07-17 Thread Charles Bailey
On Fri, Jul 17, 2015 at 03:06:57PM +0200, Johannes Schindelin wrote: From a quick `git grep '== -1'` and another quick `git grep ' 0'` it appears to me that we prefer the latter. Maybe you want to adjust it in the patch, too? I did the same grep and found lots of examples of both. Many of

Re: [PATCH] Fix detection of uname failure

2015-07-17 Thread Junio C Hamano
Charles Bailey char...@hashpling.org writes: ... I think ' 0' is probably better. In POSIX, we shouldn't ever get a negative value which isn't -1, but if we ever do it is probably safer to fail. I'll send and update. Thanks; I was about to type the same reasoning and conclusion ;-) -- To