Thread (6 messages) flat view 6 messages, 3 authors, 2016-06-15

Re: [PATCH] refs.c: enable large transactions

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:04:30

Possibly related (same subject, not in this thread)

Stefan Beller [off-list ref] 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help