assert(cmd.n_variables == 0);
cmd.n_variables = hsh_count(hash);
- cmd.v_variables = xrealloc(cmd.v_variables,
- sizeof(struct variable) * cmd.n_variables);
+ cmd.v_variables = xnrealloc (cmd.v_variables, cmd.n_variables,
+ sizeof *cmd.v_variables);
/* Iterate through the hash */
for (i=0,v = (struct variable *) hsh_first(hash,&hi);
v != 0;
/* Allocate storage for the pairs */
- pairs = xrealloc(pairs, sizeof(struct pair) * (n_pairs + n_pairs_local) );
+ pairs = xnrealloc (pairs, n_pairs + n_pairs_local, sizeof *pairs);
/* Populate the pairs with the appropriate variables */
if ( paired )
for (j=0 ; j < 2 ; ++j)
{
- struct group_statistics *gs = (struct group_statistics *)
- xmalloc (sizeof(struct group_statistics));
+ struct group_statistics *gs = xmalloc (sizeof *gs);
gs->sum = 0;
gs->n = 0;