Re: [RFC PATCH 1/2] Report exec errors from run-command
Junio C Hamano <gitster@pobox.com> 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
>>+ 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.