X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ft-test.q;h=5fdb802d633be7246b49c2f639c130e63905cf41;hb=db5df54124af56dc1dfce71f839d78da2b49e346;hp=5334a27a9068dc254b3f0bf0d9a25d8eba52c40f;hpb=6eea9310493902d3b06b25c612c7ba89d467b6fa;p=pspp diff --git a/src/t-test.q b/src/t-test.q index 5334a27a90..5fdb802d63 100644 --- a/src/t-test.q +++ b/src/t-test.q @@ -310,8 +310,8 @@ cmd_t_test(void) 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; @@ -509,7 +509,7 @@ tts_custom_pairs (struct cmd_t_test *cmd UNUSED) /* 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 ) @@ -1711,8 +1711,7 @@ group_precalc (struct cmd_t_test *cmd ) 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;