From: Junio C Hamano Date: Tue, 21 Apr 2015 18:00:11 GMT Subject: Re: [PATCH] refs.c: enable large transactions Message-ID: In-Reply-To: Stefan Beller writes: > I thought about putting a cap on it to not let it go negative in the first > place, but I did not find an easily accessible max() function, as I'd like > to write it as > > int remaining_fds = max(get_max_fd_limit() - 32, 0); > > to have it in one line. The alternative of > > int remaining_fds = get_max_fd_limit() - 32; > ... > if (remaining_fds < 0) > remaining_fds = 0 > > seemed to cuttered to me. Just to set the standard yardstick straight, either is fine, but I would say the latter is slightly preferrable from readability's point of view. Rows of dense single lines get tiring to read pretty quickly.