const bool n_sample_test = (value_compare_3way (&nst->val2, &nst->val1,
var_get_width (nst->indep_var)) > 0);
- struct results *results = xcalloc (nst->n_vars, sizeof (*results));
+ struct results *results = XCALLOC (nst->n_vars, struct results);
int n_vals = 0;
for (v = 0; v < nst->n_vars; ++v)
{
if (n_sample_test == false)
{
- struct val_node *vn = xzalloc (sizeof *vn);
+ struct val_node *vn = XZALLOC (struct val_node);
value_clone (&vn->val, &nst->val1, var_get_width (nst->indep_var));
hmap_insert (&map, &vn->node, value_hash (&nst->val1,
var_get_width (nst->indep_var), 0));
}
results[v].n = count;
- results[v].sorted_array = xcalloc (hmap_count (&map), sizeof (void*));
+ results[v].sorted_array = XCALLOC (hmap_count (&map), struct val_node *);
results[v].var = var;
HMAP_FOR_EACH (vn, struct val_node, node, &map)