Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [RFC PATCH 1/2] Report exec errors from run-command

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:56

Junio C Hamano [off-list ref] writes:
 - At first reading, the "while (close(fd) < 0 && errno != EBADF);"
   pattern was a bit of eyesore.  It might be worth factoring that out to
   a small static helper function that a smart compiler would
   automatically inline (or mark it as a static inline).
This also is a minor style thing, but we prefer your
quoted
+		while(close(report_pipe[1]) < 0 && errno != EBADF);
formatted like this:

	while (foobar)
        	; /* noop */

to

 (1) have SP after syntactic keyword like while/if/switch to differentiate
     from function calls; and 

 (2) make the no-op stand out for a bit more visibility.

 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help