3 ms·
That'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)
by takeda 10y ago
That'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);