Remove unnecessary type casts from xalloc calls.