Use XCALLOC / XZALLOC macros where reasonable
[pspp] / src / language / stats / chisquare.c
index eb21644d4af17b1ec79b88df805cbbe6ea82bdf2..d1d81bab39dcc26e422aa32e96354c5c16a808d5 100644 (file)
@@ -141,8 +141,8 @@ chisquare_execute (const struct dataset *ds,
   struct one_sample_test *ost = &cst->parent;
   double total_expected = 0.0;
 
-  double *df = xzalloc (sizeof (*df) * ost->n_vars);
-  double *xsq = xzalloc (sizeof (*df) * ost->n_vars);
+  double *df = XCALLOC (ost->n_vars, double);
+  double *xsq = XCALLOC (ost->n_vars, double);
   bool ok;
 
   for (i = 0 ; i < cst->n_expected ; ++i)