Replaced use of errno with assert
authorJason Stover <jhs@math.gcsu.edu>
Fri, 14 Oct 2005 15:13:59 +0000 (15:13 +0000)
committerJason Stover <jhs@math.gcsu.edu>
Fri, 14 Oct 2005 15:13:59 +0000 (15:13 +0000)
src/regression.q

index d6ebc5200e313878515ac4aef77c6fdca11bd240..ba413a068069cc2d0176708fc6aa0993e2b25af5 100644 (file)
@@ -495,18 +495,8 @@ run_regression (const struct casefile *cf, void *cmd_)
           */
          if (is_depvar (i))
            {
-             if (v->type == NUMERIC)
-               {
-                 gsl_vector_set (Y, row, val->f);
-               }
-             else
-               {
-                 errno = EINVAL;
-                 fprintf (stderr,
-                          "%s:%d: Dependent variable should be numeric: %s\n",
-                          __FILE__, __LINE__, strerror (errno));
-                 err_cond_fail ();
-               }
+             assert(v->type == NUMERIC);
+             gsl_vector_set (Y, row, val->f);
            }
          else
            {