Stefan Beller <sbeller@xxxxxxxxxx> 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. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html