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

Re: [PATCH] Remove useless if-before-free tests.

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 18, 2008, 09:36 UTC
Message-ID
<7vwsp2ppwc.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<87pruuy64v.fsf@rho.meyering.net>
Jim Meyering <jim@meyering.net> writes:
Show 5 quoted lines
> It's a definite loss of portability if you can find a reasonable porting
> target for which free(NULL) fails.  But even if you do, the fix is
> not to reject the clean-up, but to amend it with a wrapper function.
> That encapsulates the work-around in one place rather than polluting
> all of those files.

As we already have unchecked free(ptr) in our code _anyway_, there _technically_ is no reason to reject the clean-up patch.

We just need to find a quiescent time to do so so that actively cooking patches in people's trees (and topics in 'next') won't get needless conflicts.

Previous: Jim MeyeringNext: Johannes Schindelin
Message 4 of 18 in “Remove useless if-before-free tests.”
  1. Remove useless if-before-free tests.Jim Meyering, Feb 17, 2008
  2. David SymondsFeb 17, 2008
  3. Jim MeyeringFeb 18, 2008
  4. Junio C HamanoFeb 18, 2008
  5. Johannes SchindelinFeb 17, 2008
  6. Jim MeyeringFeb 18, 2008
  7. Jean-Luc HerrenFeb 18, 2008
  8. Jim MeyeringFeb 20, 2008
  9. Junio C HamanoFeb 22, 2008
  10. Jim MeyeringFeb 22, 2008
  11. Junio C HamanoFeb 22, 2008
  12. Jim MeyeringFeb 22, 2008
  13. Junio C HamanoFeb 22, 2008
  14. Jim MeyeringFeb 24, 2008
  15. Mike RalphsonFeb 26, 2009
  16. Uwe Kleine-KönigFeb 26, 2008
  17. Morten WelinderFeb 23, 2008
  18. Johannes SchindelinFeb 24, 2008

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.