Error message needs a period at end of sentence.
[pspp] / src / language / expressions / evaluate.c
index 9398b41cd239b285061cffca4522e87f806d15ca..fd12a04b059de0b2972f8f86c8e43a5d3c9ea4c8 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <ctype.h>
 #include <libpspp/alloc.h>
+#include <libpspp/assertion.h>
 #include <libpspp/message.h>
 #include "helpers.h"
 #include "evaluate.h"
@@ -67,7 +68,7 @@ expr_evaluate (struct expression *e, const struct ccase *c, int case_idx,
 #include "evaluate.inc"
           
        default:
-         abort ();
+         NOT_REACHED ();
        }
     }
 }
@@ -162,9 +163,10 @@ cmd_debug_evaluate (void)
           if (c == NULL) 
             {
               c = xmalloc (sizeof *c);
-              case_nullify (c);
+              case_create (c, dict_get_next_value_idx (d));
             }
-          case_resize (c, old_value_cnt, dict_get_next_value_idx (d));
+          else
+            case_resize (c, old_value_cnt, dict_get_next_value_idx (d));
 
           if (lex_is_number ())
             case_data_rw (c, v->fv)->f = tokval;
@@ -233,7 +235,7 @@ cmd_debug_evaluate (void)
         }
 
       default:
-        assert (0);
+        NOT_REACHED ();
       }
 
   expr_free (expr);
@@ -299,7 +301,7 @@ expr_debug_print_postfix (const struct expression *e)
           fprintf (stderr, "i<%d>", op->integer);
           break;
         default:
-          abort ();
+          NOT_REACHED ();
         } 
     }
   fprintf (stderr, "\n");