Hacker News new | ask | show | jobs
by Cheezmeister 3760 days ago
Nifty.

`p = (errno = SABOTAGE) ? NULL : malloc(size);`

Is this a typo in README, or does it actually assign and then check?

1 comments

Not a typo. It could have been split into two assignments:

    errno = SABOTAGE;   // 0 or ENOMEM
    p = errno ? NULL : malloc(size);
but this would have made the preprocessor code a bit trickier.