libgcc/
* libgcov-util.c (tag_counters): Swap order of arguments to xcalloc.
(topen_to_memory_representation): Likewise.
Signed-off-by: Peter Damianov <peter0x44@disroot.org>
gcc_assert (k_ctrs[tag_ix].num == 0);
k_ctrs[tag_ix].num = n_counts;
- k_ctrs[tag_ix].values = values = (gcov_type *) xcalloc (sizeof (gcov_type),
- n_counts);
+ k_ctrs[tag_ix].values = values = (gcov_type *) xcalloc (n_counts,
+ sizeof (gcov_type));
gcc_assert (values);
if (length > 0)
if (n > 0)
{
struct gcov_kvp *tuples
- = (struct gcov_kvp *)xcalloc (sizeof (struct gcov_kvp), n);
+ = (struct gcov_kvp *)xcalloc (n, sizeof (struct gcov_kvp));
for (unsigned i = 0; i < n - 1; i++)
tuples[i].next = &tuples[i + 1];
for (unsigned i = 0; i < n; i++)