From: Junio C Hamano Date: Fri, 25 Dec 2009 08:40:11 GMT Subject: Re: [RFC PATCH 1/2] Report exec errors from run-command Message-ID: <7vd423e9as.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vr5qjecbb.fsf@alter.siamese.dyndns.org> Junio C Hamano 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.