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

Re: [PATCH] hex: use unsigned index for ring buffer

From
Jeff King <peff@peff.net>
Date
Oct 25, 2016, 00:30 UTC
Message-ID
<20161025003023.6vaqofsixana3zno@sigill.intra.peff.net>
In-Reply-To
<xmqq60ohtib5.fsf@gitster.mtv.corp.google.com>
On Mon, Oct 24, 2016 at 04:53:50PM -0700, Junio C Hamano wrote:
Show 5 quoted lines
> > So how about this?  It gets rid of magic number 3 and works for array
> > size that's not a power of two.  And as a nice side effect it can't
> > trigger a signed overflow anymore.
> 
> Looks good to me.  Peff?
Any of the variants discussed in this thread is fine by me.
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 14 in “hex: use unsigned index for ring buffer”
  1. hex: use unsigned index for ring bufferRené Scharfe, Oct 23, 2016
  2. Jeff KingOct 23, 2016
  3. René ScharfeOct 23, 2016
  4. Jeff KingOct 24, 2016
  5. Junio C HamanoOct 24, 2016
  6. Junio C HamanoOct 24, 2016
  7. René ScharfeOct 24, 2016
  8. Junio C HamanoOct 24, 2016
  9. Jeff KingOct 25, 2016
  10. Junio C HamanoOct 25, 2016
  11. Jeff KingOct 25, 2016
  12. Junio C HamanoOct 25, 2016
  13. René ScharfeOct 26, 2016
  14. Junio C HamanoOct 26, 2016

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.