X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Foneway.c;h=e20d55198bc1568bdf2432d0a27b5677cc8dcfc9;hb=339f1956cc72;hp=2f1f299839c64536afa87d590516168d7bcbf03c;hpb=0200682d517fd4b7cfc4e333378de03bcf74be43;p=pspp diff --git a/src/language/stats/oneway.c b/src/language/stats/oneway.c index 2f1f299839..e20d55198b 100644 --- a/src/language/stats/oneway.c +++ b/src/language/stats/oneway.c @@ -526,7 +526,7 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds) } else if (lex_match_id (lexer, "CONTRAST")) { - struct contrasts_node *cl = xzalloc (sizeof *cl); + struct contrasts_node *cl = XZALLOC (struct contrasts_node); struct ll_list *coefficient_list = &cl->coefficient_list; lex_match (lexer, T_EQUALS); @@ -709,8 +709,8 @@ run_oneway (const struct oneway_spec *cmd, struct oneway_workspace ws; ws.actual_number_of_groups = 0; - ws.vws = xzalloc (cmd->n_vars * sizeof (*ws.vws)); - ws.dd_total = xmalloc (sizeof (struct descriptive_data) * cmd->n_vars); + ws.vws = xcalloc (cmd->n_vars, sizeof (*ws.vws)); + ws.dd_total = XCALLOC (cmd->n_vars, struct descriptive_data*); for (v = 0 ; v < cmd->n_vars; ++v) ws.dd_total[v] = dd_create (cmd->vars[v]);