X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Foneway.q;h=f413cda15410af5bc0bcd269cfb64c03fbd676c4;hb=07fac5fffc0550150552a7de7cacba1bf68fe09b;hp=26f2f0ce697596763628ecfb972b9f74fdf9a870;hpb=6eea9310493902d3b06b25c612c7ba89d467b6fa;p=pspp diff --git a/src/oneway.q b/src/oneway.q index 26f2f0ce69..f413cda154 100644 --- a/src/oneway.q +++ b/src/oneway.q @@ -157,7 +157,7 @@ output_oneway(void) size_t i; short *bad_contrast ; - bad_contrast = xmalloc ( sizeof (short) * cmd.sbc_contrast ); + bad_contrast = xnmalloc (cmd.sbc_contrast, sizeof *bad_contrast); /* Check the sanity of the given contrast values */ for (i = 0 ; i < cmd.sbc_contrast ; ++i ) @@ -949,9 +949,7 @@ run_oneway(const struct casefile *cf, void *cmd_) if ( ! gs ) { - gs = (struct group_statistics *) - xmalloc (sizeof(struct group_statistics)); - + gs = xmalloc (sizeof *gs); gs->id = *indep_val; gs->sum=0; gs->n=0;