Thread (10 messages) flat view 10 messages, 6 authors, 2016-06-15

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

From: Matthias Andree <hidden>
Date: 2016-06-15 22:47:03

Am 11.07.2009, 11:45 Uhr, schrieb Stephen R. van den Berg [off-list ref]:
Matthias Andree wrote:
quoted
+	/* 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help