Fix memory leaks.
[pspp-builds.git] / src / do-if.c
index 339710696326035de2bf4ec760a9b05dedfe246f..73fc057c037ac6ad15f383bb3ed432adf7622957 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <config.h>
 #include "do-ifP.h"
-#include <assert.h>
+#include "error.h"
 #include <stdlib.h>
 #include "alloc.h"
 #include "command.h"
 
 #include "debug-print.h"
 
-#if DEBUGGING
-#include <stdio.h>
-#endif
-
 /* *INDENT-OFF* */
 /* Description of DO IF transformations:
 
@@ -155,8 +151,6 @@ cmd_else (void)
 {
   struct do_if_trns *t;
 
-  lex_match_id ("ELSE");
-
   /* Check that we're in a pleasing situation. */
   if (!ctl_stack || ctl_stack->type != CST_DO_IF)
     {
@@ -198,8 +192,6 @@ cmd_end_if (void)
   /* List iterator. */
   struct do_if_trns *iter;
 
-  lex_match_id ("IF");
-
   /* Check that we're in a pleasing situation. */
   if (!ctl_stack || ctl_stack->type != CST_DO_IF)
     {
@@ -252,9 +244,7 @@ parse_do_if (void)
   struct do_if_trns *t;
   struct expression *e;
 
-  lex_match_id ("IF");
-
-  e = expr_parse (PXP_BOOLEAN);
+  e = expr_parse (EXPR_BOOLEAN);
   if (!e)
     return NULL;
   if (token != '.')