3 ms·
Note the difference between "is allowed" vs "must". If you write a program that relies on this behaviour you're going to have a hard to track down bug at some
by imron 10y ago
Note the difference between "is allowed" vs "must".
If you write a program that relies on this behaviour you're going to have a hard to track down bug at some point.
- takeda 10y agoThat's even stronger case for not relying on errno to catch errors. The code should be something like this: buf = calloc(huge, huge); if (!buf) perror("calloc failed"); printf("calloc(huge, huge) returned: %p\n", buf); free(buf);