Settings

Theme

Show HN: Sabotage your C code

github.com

8 points by outerspace 10 years ago · 2 comments

Reader

Cheezmeister 10 years ago

Nifty.

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

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

  • outerspaceOP 10 years ago

    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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection