From: Ted Lemon Date: Tue, 16 Mar 1999 00:42:03 +0000 (+0000) Subject: Fix parsing of elsif and else if statements. X-Git-Tag: V3-ALPHA-19990315~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dce70f9f2d216ef4dd78f9e79228f507142f81f0;p=thirdparty%2Fdhcp.git Fix parsing of elsif and else if statements. --- diff --git a/common/parse.c b/common/parse.c index 9f39ea1ad..e39c86974 100644 --- a/common/parse.c +++ b/common/parse.c @@ -42,7 +42,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.14 1999/02/25 23:30:35 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.15 1999/03/16 00:42:03 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -902,6 +902,7 @@ struct executable_statement *parse_executable_statement (cfile, lose) switch (peek_token (&val, cfile)) { case IF: + next_token (&val, cfile); stmt = parse_if_statement (cfile, lose); return stmt; case ADD: @@ -1020,7 +1021,6 @@ struct executable_statement *parse_if_statement (cfile, lose) struct expression *if_condition; struct executable_statement *true, *false; - token = next_token (&val, cfile); if_condition = (struct expression *)0; if (!parse_boolean_expression (&if_condition, cfile, lose)) { if (!*lose)