Change how checking for missing values works.
[pspp] / src / language / stats / ks-one-sample.c
index 89559b798fe5dcc32843cd0980027693cff8771b..d959ad753e3d700718a3cab223e076dca814fd9a 100644 (file)
@@ -145,7 +145,7 @@ ks_one_sample_execute (const struct dataset *ds,
   int v;
   struct casereader *r = casereader_clone (input);
 
-  struct ks *ks = xcalloc (ost->n_vars, sizeof *ks);
+  struct ks *ks = XCALLOC (ost->n_vars,  struct ks);
 
   for (v = 0; v < ost->n_vars; ++v)
     {
@@ -167,7 +167,7 @@ ks_one_sample_execute (const struct dataset *ds,
          const struct variable *var = ost->vars[v];
          const union value *val = case_data (c, var);
 
-         if (var_is_value_missing (var, val, exclude))
+         if (var_is_value_missing (var, val) & exclude)
            continue;
 
          minimize (&ks[v].test_min, val->f);
@@ -230,7 +230,7 @@ ks_one_sample_execute (const struct dataset *ds,
          const double weight = dict_get_case_weight (dict, c, &warn);
          const union value *val = case_data (c, var);
 
-         if (var_is_value_missing (var, val, exclude))
+         if (var_is_value_missing (var, val) & exclude)
            continue;
 
          cc += weight;