X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fcrosstabs.c;h=465bdcc278fcab0d806164bad81ad91a23dd12bd;hb=bb159a5ed92f0e529bd0034efd2d2d41e02c723a;hp=0b9d1519517b100f6e0376110ab3a91813a44a9d;hpb=cd221d80fafb54e550398c6de105d4c1b7f02ba0;p=pspp diff --git a/src/language/stats/crosstabs.c b/src/language/stats/crosstabs.c index 0b9d151951..465bdcc278 100644 --- a/src/language/stats/crosstabs.c +++ b/src/language/stats/crosstabs.c @@ -59,6 +59,7 @@ #include "output/charts/barchart.h" #include "gl/minmax.h" +#include "gl/xalloc-oversized.h" #include "gl/xalloc.h" #include "gl/xsize.h" @@ -605,7 +606,7 @@ parse_crosstabs_tables (struct lexer *lexer, struct dataset *ds, } } - int *by_iter = xcalloc (n_by, sizeof *by_iter); + int *by_iter = XCALLOC (n_by, int); proc->pivots = xnrealloc (proc->pivots, proc->n_pivots + nx, sizeof *proc->pivots); for (int i = 0; i < nx; i++) @@ -911,7 +912,7 @@ postcalc (struct crosstabs_proc *proc) if (proc->barchart) { int n_vars = (xt->n_vars > 2 ? 2 : xt->n_vars); - const struct variable **vars = xcalloc (n_vars, sizeof *vars); + const struct variable **vars = XCALLOC (n_vars, const struct variable*); for (size_t i = 0; i < n_vars; i++) vars[i] = xt->vars[i].var; chart_submit (barchart_create (vars, n_vars, _("Count"), @@ -1921,6 +1922,7 @@ display_risk (struct crosstabulation *xt, struct pivot_table *risk, union value c[2]; if (!calc_risk (xt, risk_v, upper, lower, c, &n_valid)) return; + assert (risk_statistics); size_t *indexes = xnmalloc (risk->n_dimensions, sizeof *indexes); assert (xt->n_vars == 2); @@ -2955,9 +2957,3 @@ calc_directional (struct crosstabs_proc *proc, struct crosstabulation *xt, return 1; } - -/* - Local Variables: - mode: c - End: -*/