See our FAQ on casting malloc.