git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Fix detection of uname failure

From
Charles Bailey <charles@hashpling.org>
Date
Jul 17, 2015, 17:01 UTC
Message-ID
<20150717170142.GA9616@hashpling.org>
In-Reply-To
<ef7d56584c3b5d6431f895df1d94eba8@www.dscho.org>
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 the "< 0" applied to comparisons with variables and not API calls and many were internal (to git) calls and not POSIX or C library calls so I wasn't convinced to change my initial fix.

Having said that and thought about it some more, 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.

Charles.
Previous: Johannes SchindelinNext: Junio C Hamano
Message 3 of 8 in “Fix detection of uname failure”
  1. Fix detection of uname failureCharles Bailey, Jul 17, 2015
  2. Johannes SchindelinJul 17, 2015
  3. Charles BaileyJul 17, 2015
  4. Junio C HamanoJul 17, 2015
  5. Fix detection of uname failureCharles Bailey, Jul 17, 2015
  6. Johannes SchindelinJul 17, 2015
  7. Junio C HamanoJul 17, 2015
  8. Johannes SchindelinJul 18, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.