Change how checking for missing values works.
[pspp] / src / language / stats / cochran.c
index 480248637f4b1890dd463e37f1e9fea6518bf3f8..9b03296f19a730e0d45b0c86754302d4a25894de 100644 (file)
@@ -80,16 +80,16 @@ cochran_execute (const struct dataset *ds,
   for (; (c = casereader_read (input)); case_unref (c))
     {
       double case_hits = 0.0;
-      const double w = weight ? case_data (c, weight)->f: 1.0;
+      const double w = weight ? case_num (c, weight) : 1.0;
       for (v = 0; v < ct->n_vars; ++v)
        {
          const struct variable *var = ct->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;
 
-         if ( ch.success == SYSMIS)
+         if (ch.success == SYSMIS)
            {
              ch.success = val->f;
            }
@@ -97,12 +97,12 @@ cochran_execute (const struct dataset *ds,
            {
              ch.failure = val->f;
            }
-         if ( ch.success == val->f)
+         if (ch.success == val->f)
            {
              ch.hits[v] += w;
              case_hits += w;
            }
-         else if ( ch.failure == val->f)
+         else if (ch.failure == val->f)
            {
              ch.misses[v] += w;
            }