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

Re: [PATCH] Fix export_marks() error handling.

From
MAMatthias Andree <matthias.andree@gmx.de>
Date
Jul 13, 2009, 08:01 UTC
Message-ID
<op.uwzxxj2m1e62zd@merlin.emma.line.org>
In-Reply-To
<20090711094546.GA12399@cuci.nl>
Am 11.07.2009, 11:45 Uhr, schrieb Stephen R. van den Berg <srb@cuci.nl>:
Show 14 quoted lines
> Matthias Andree wrote:
>> +	/* do not optimize the next two lines - they must both be executed in
>> +	 * this order. || might short-circuit the fclose(), and combining them
>> +	 * into one statement might reverse the order of execution.
>> +	 * Also, fflush() may not be sufficient - on some file systems, the
>> +	 * error is still delayed until the final [f]close().  */
>> +	e  = ferror(f);
>> +	e |= fclose(f);
>> +	if (e)
>
> The commentary above should be common knowledge for anyone familiar with
> ANSI C.  So I'd suggest moving the comments into the description section  
> of
> the commit and removing them from the actual code.

Feel free to do it and submit a patch, I'm not going to invest more time into a piece of code that runs seldomly.

-- 
Matthias Andree
Previous: Stephen R. van den BergNext: Matthias Andree
Message 9 of 10 in “found a resource leak in file builtin-fast-export.c”
  1. Martin EttlJul 9, 2009
  2. Thomas RastJul 9, 2009
  3. Johannes SchindelinJul 9, 2009
  4. Thomas RastJul 9, 2009
  5. Andreas EricssonJul 9, 2009
  6. Johannes SchindelinJul 9, 2009
  7. Fix export_marks() error handling.Matthias Andree, Jul 9, 2009
  8. Stephen R. van den BergJul 11, 2009
  9. Matthias AndreeJul 13, 2009
  10. Matthias AndreeJul 9, 2009

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.