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.