Change how checking for missing values works.
[pspp] / src / language / stats / oneway.c
index a61286255674fede14891abce111cd640c2970d5..6ad71f14c829fc75a91b63e89854f18d9fc3b179 100644 (file)
@@ -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]);
@@ -772,7 +772,7 @@ run_oneway (const struct oneway_spec *cmd,
 
          if (MISS_ANALYSIS == cmd->missing_type)
            {
-             if (var_is_value_missing (v, val, cmd->exclude))
+             if (var_is_value_missing (v, val) & cmd->exclude)
                continue;
            }
 
@@ -795,7 +795,7 @@ run_oneway (const struct oneway_spec *cmd,
 
          if (MISS_ANALYSIS == cmd->missing_type)
            {
-             if (var_is_value_missing (v, val, cmd->exclude))
+             if (var_is_value_missing (v, val) & cmd->exclude)
                continue;
            }
 
@@ -819,7 +819,7 @@ run_oneway (const struct oneway_spec *cmd,
 
          if (MISS_ANALYSIS == cmd->missing_type)
            {
-             if (var_is_value_missing (v, val, cmd->exclude))
+             if (var_is_value_missing (v, val) & cmd->exclude)
                continue;
            }