fixed computation of sample covariance
[pspp-builds.git] / src / data / format.c
index 7066c053f5867ec0e7d2a6e89bf498e38793f731..f4a61d34bc1efd0f18bcb89170740a44170892a9 100644 (file)
@@ -20,6 +20,7 @@
 #include <config.h>
 #include "format.h"
 #include <ctype.h>
+#include <libpspp/assertion.h>
 #include <libpspp/message.h>
 #include <stdlib.h>
 #include <libpspp/compiler.h>
@@ -280,7 +281,7 @@ convert_fmt_ItoO (const struct fmt_spec *input, struct fmt_spec *output)
     case FMT_CCC:
     case FMT_CCD:
     case FMT_CCE:
-      assert (0);
+      NOT_REACHED ();
     case FMT_Z:
     case FMT_A:
       /* nothing is necessary */
@@ -314,7 +315,7 @@ convert_fmt_ItoO (const struct fmt_spec *input, struct fmt_spec *output)
       /* nothing is necessary */
       break;
     default:
-      assert (0);
+      NOT_REACHED ();
     }
 
   assert (check_output_specifier (output, 0));
@@ -378,14 +379,13 @@ bool
 measure_is_valid(enum measure m)
 {
   if ( m <= 0 ) return false;
-  if ( m >= n_MEASURES) false;
+  if ( m >= n_MEASURES) return false;
   return true;
 }
 
 bool 
 alignment_is_valid(enum alignment a)
 {
-  if ( a < 0 ) return false;
   if ( a >= n_ALIGN) return false;
   return true;
 }