Hacker News new | ask | show | jobs
by tkmcc 4383 days ago
It may not be a good reason to do this, but you can condense

    if (failure) {
        errno = EINVAL;
        return -1;
    }
into

    if (failure)
        return (errno = EINVAL, -1);
1 comments

In any sane code, you'd have the open and close brackets anyways, so all this code does is trade a few '\n' characters for a few parentheses characters. I'd opt for the former still.