Earlier quoted context omitted.
Why the hate over casting malloc? It really is not a huge issue. A related question is why do people use malloc if calloc is available?
Why programmers don't always use calloc: good question. Firstly, anyone who does mallocs a block, and then immediately does a memset(block, 0, size) on that block almost certainly should be using calloc. The Linux kernel has kzalloc for this purpose as an alternative to kmalloc and it's fairly widely used. Sometimes it is inefficient to set something to zero, when that is not the true initial value (some or all of th…
Finding bugs where you write 101 bytes are easy to find with tools like Valgrind, but finding bugs where you malloc and don’t initialise the data structure correctly are a real pain.