indent(1): Fix breakage caused by single comment following "else".

indent(1) simply wasn't taught that "else" may be followed by a comment
without any opening brace anywhere on the line, so it was very confused
in such cases.

Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Obtained from:	Piotr Stefaniak
This commit is contained in:
Pedro F. Giffuni 2016-07-29 16:17:54 +00:00
parent 11821cabe8
commit 5cd358485e

View File

@ -319,6 +319,8 @@ main(int argc, char **argv)
switch (type_code) {
case newline:
++line_no;
if (sc_end != NULL)
goto sw_buffer; /* dump comment, if any */
flushed_nl = true;
case form_feed:
break; /* form feeds and newlines found here will be