Change how checking for missing values works.
[pspp] / src / language / stats / sign.c
index a832c98b7ea44a8c5bf39b1dee88c3f121a3ff72..32a74b20e07cc60004ac55923718181cace2eee6 100644 (file)
@@ -138,7 +138,7 @@ sign_execute (const struct dataset *ds,
   const struct two_sample_test *t2s = UP_CAST (test, const struct two_sample_test, parent);
   struct ccase *c;
 
-  struct sign_test_params *stp = xcalloc (t2s->n_pairs, sizeof *stp);
+  struct sign_test_params *stp = XCALLOC (t2s->n_pairs,  struct sign_test_params);
 
   struct casereader *r = input;
 
@@ -153,10 +153,10 @@ sign_execute (const struct dataset *ds,
          const union value *value1 = case_data (c, (*vp)[1]);
          const double diff = value0->f - value1->f;
 
-         if (var_is_value_missing ((*vp)[0], value0, exclude))
+         if (var_is_value_missing ((*vp)[0], value0) & exclude)
            continue;
 
-         if (var_is_value_missing ((*vp)[1], value1, exclude))
+         if (var_is_value_missing ((*vp)[1], value1) & exclude)
            continue;
 
          if (diff > 0)