summaryrefslogtreecommitdiffstats
path: root/usr.bin/indent
diff options
context:
space:
mode:
authorrnordier <rnordier@FreeBSD.org>1999-05-21 14:46:52 +0000
committerrnordier <rnordier@FreeBSD.org>1999-05-21 14:46:52 +0000
commitb7273904c8ae112c94a87ef30a4c1ec8b2a6076a (patch)
tree45e8815423b5f38ce46f6c2f46daee3c99fe25a2 /usr.bin/indent
parentbe862454f7792a59b4f2c48cb29656895d5a616f (diff)
downloadFreeBSD-src-b7273904c8ae112c94a87ef30a4c1ec8b2a6076a.zip
FreeBSD-src-b7273904c8ae112c94a87ef30a4c1ec8b2a6076a.tar.gz
Improve handling of "do ... while" following "else". This change
eliminates some incorrect "Unmatched 'else'" errors.
Diffstat (limited to 'usr.bin/indent')
-rw-r--r--usr.bin/indent/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/indent/parse.c b/usr.bin/indent/parse.c
index f3a4b44..eeeb30a 100644
--- a/usr.bin/indent/parse.c
+++ b/usr.bin/indent/parse.c
@@ -310,7 +310,7 @@ reduce()
case whilestmt: /* while (...) on top */
if (ps.p_stack[ps.tos - 1] == dohead) {
/* it is termination of a do while */
- ps.p_stack[--ps.tos] = stmt;
+ ps.tos -= 2;
break;
}
else
OpenPOWER on IntegriCloud