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:
parent
11821cabe8
commit
5cd358485e
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user