From: "Stephen R. van den Berg" <srb@cuci.nl>
To: Matthias Andree <matthias.andree@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix export_marks() error handling.
Date: Sat, 11 Jul 2009 11:45:46 +0200 [thread overview]
Message-ID: <20090711094546.GA12399@cuci.nl> (raw)
In-Reply-To: <1247146081-4692-1-git-send-email-matthias.andree@gmx.de>
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.
--
Sincerely,
Stephen R. van den Berg.
"And now for something *completely* different!"
next prev parent reply other threads:[~2009-07-11 9:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-09 7:57 found a resource leak in file builtin-fast-export.c Martin Ettl
2009-07-09 8:31 ` Thomas Rast
2009-07-09 11:04 ` Johannes Schindelin
2009-07-09 11:24 ` Thomas Rast
2009-07-09 11:30 ` Andreas Ericsson
2009-07-09 13:01 ` Johannes Schindelin
2009-07-09 13:28 ` [PATCH] Fix export_marks() error handling Matthias Andree
2009-07-11 9:45 ` Stephen R. van den Berg [this message]
2009-07-13 8:01 ` Matthias Andree
2009-07-09 13:36 ` found a resource leak in file builtin-fast-export.c Matthias Andree
[not found] <7v7hxyyfcg.fsf@alter.siamese.dyndns.org>
2009-07-24 8:17 ` [PATCH] Fix export_marks() error handling Matthias Andree
2009-07-24 16:35 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090711094546.GA12399@cuci.nl \
--to=srb@cuci.nl \
--cc=git@vger.kernel.org \
--cc=matthias.andree@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).