Fix xcalloc() calls so order of arguments is not reversed.