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

Re: [PATCH 2/3] sha1: clean pointer arithmetic

From
Yann Droneaud <ydroneaud@opteya.com>
Date
Sep 12, 2012, 20:50 UTC
Message-ID
<1347483030.1961.13.camel@test.quest-ce.net>
In-Reply-To
<7vd31rcck4.fsf@alter.siamese.dyndns.org>
Le mercredi 12 septembre 2012 à 11:37 -0700, Junio C Hamano a écrit :
Show 11 quoted lines
> Yann Droneaud <ydroneaud@opteya.com> writes:
> 
> > One memcpy() argument is computed from a pointer added to an integer:
> > eg. int + pointer. It's unusal.
> > Let's write it in the correct order: pointer + offset.
> 
> Meh.
> 
> Both are correct.  Aren't ctx->w[lenW] and lenW[ctx-w] both correct,
> even?
> 

"correct" in my commit log message should be read as "the way it's used by most C developer".

It's again a cosmetic fix.
-- 
Yann Droneaud
Previous: Junio C HamanoNext: Bruce Korb
Message 6 of 14 in “Janitor minor fixes on SHA1”
  1. 0/3 Janitor minor fixes on SHA1Yann Droneaud, Sep 12, 2012
  2. 1/3 sha1: update pointer and remaining length after subfunction callYann Droneaud, Sep 12, 2012
  3. Junio C HamanoSep 12, 2012
  4. 2/3 sha1: clean pointer arithmeticYann Droneaud, Sep 12, 2012
  5. Junio C HamanoSep 12, 2012
  6. Yann DroneaudSep 12, 2012
  7. Bruce KorbSep 12, 2012
  8. 3/3 sha1: use char type for temporary work bufferYann Droneaud, Sep 12, 2012
  9. Jeff KingSep 12, 2012
  10. Yann DroneaudSep 12, 2012
  11. Jeff KingSep 12, 2012
  12. Yann DroneaudSep 13, 2012
  13. Junio C HamanoSep 12, 2012
  14. Yann DroneaudSep 12, 2012

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.