Date: Fri, 29 Jul 2016 16:23:00 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303485 - head/usr.bin/indent Message-ID: <201607291623.u6TGN08u064305@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Fri Jul 29 16:23:00 2016 New Revision: 303485 URL: https://svnweb.freebsd.org/changeset/base/303485 Log: indent(1): fix struct termination detection. Semicolons inside struct declarations don't end the declarations. Differential Revision: https://reviews.freebsd.org/D6966 (Partial) Obtained from: Piotr Stefaniak Modified: head/usr.bin/indent/indent.c Modified: head/usr.bin/indent/indent.c ============================================================================== --- head/usr.bin/indent/indent.c Fri Jul 29 16:17:54 2016 (r303484) +++ head/usr.bin/indent/indent.c Fri Jul 29 16:23:00 2016 (r303485) @@ -701,8 +701,10 @@ check_type: break; case semicolon: /* got a ';' */ - ps.in_or_st = false;/* we are not in an initialization or - * structure declaration */ + if (ps.dec_nest == 0) { + /* we are not in an initialization or structure declaration */ + ps.in_or_st = false; + } scase = false; /* these will only need resetting in an error */ squest = 0; if (ps.last_token == rparen && rparen_count == 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607291623.u6TGN08u064305>