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

Re: [PATCH v2 2/4] xdiff/xprepare: refactor abort cleanups

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Jul 7, 2011, 04:05 UTC
Message-ID
<CALUzUxoSBVfzEhvKQahhRXCDsFs5nQvfHeohHUJMeJ7QYMv3wA@mail.gmail.com>
In-Reply-To
<4E152E31.4020105@cisco.com>
On Thu, Jul 7, 2011 at 11:55 AM, Phil Hord <hordp@cisco.com> wrote:
> Because 'free(NULL)' is handled sanely (as a no-op).
> http://pubs.opengroup.org/onlinepubs/009695399/functions/free.html
Yup, I got what Junio meant after he posted an example. (Thanks Junio.)
> I haven't looked, but I assume xdl_cha_free does the same thing.  I only
> assume this because Junio seems to imply it, though.

xdl_cha_(init|free)() do something more complicated, so we don't have to set xdf->cha to NULL, unlike the others.

-- 
Cheers,
Ray Chuan
Previous: Phil HordNext: Tay Ray Chuan
Message 11 of 16 in “prepare for histogram diff”
  1. 0/4 prepare for histogram diffTay Ray Chuan, Jul 6, 2011
  2. 1/4 xdiff/xprepare: use memset()Tay Ray Chuan, Jul 6, 2011
  3. 2/4 xdiff/xprepare: refactor abort cleanupsTay Ray Chuan, Jul 6, 2011
  4. 3/4 xdiff/xpatience: factor out fall-back-diff functionTay Ray Chuan, Jul 6, 2011
  5. 4/4 t4033-diff-patience: factor out testsTay Ray Chuan, Jul 6, 2011
  6. Junio C HamanoJul 6, 2011
  7. Junio C HamanoJul 6, 2011
  8. Tay Ray ChuanJul 6, 2011
  9. Junio C HamanoJul 6, 2011
  10. Phil HordJul 7, 2011
  11. Tay Ray ChuanJul 7, 2011
  12. 0/4 prepare for histogram diffTay Ray Chuan, Jul 7, 2011
  13. 1/4 xdiff/xprepare: use memset()Tay Ray Chuan, Jul 7, 2011
  14. 2/4 xdiff/xprepare: refactor abort cleanupsTay Ray Chuan, Jul 7, 2011
  15. 3/4 xdiff/xpatience: factor out fall-back-diff functionTay Ray Chuan, Jul 7, 2011
  16. 4/4 t4033-diff-patience: factor out testsTay Ray Chuan, Jul 7, 2011

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.