From owner-svn-src-all@freebsd.org Mon Aug 1 15:25:29 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E48F4BAB051; Mon, 1 Aug 2016 15:25:29 +0000 (UTC) (envelope-from email@piotr-stefaniak.me) Received: from BAY004-OMC4S18.hotmail.com (bay004-omc4s18.hotmail.com [65.54.190.220]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B5A081D39; Mon, 1 Aug 2016 15:25:29 +0000 (UTC) (envelope-from email@piotr-stefaniak.me) Received: from EUR01-DB5-obe.outbound.protection.outlook.com ([65.54.190.200]) by BAY004-OMC4S18.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.23008); Mon, 1 Aug 2016 08:24:23 -0700 Received: from DB5EUR01FT009.eop-EUR01.prod.protection.outlook.com (10.152.4.59) by DB5EUR01HT225.eop-EUR01.prod.protection.outlook.com (10.152.5.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.8; Mon, 1 Aug 2016 15:24:22 +0000 Received: from VI1PR0901MB1501.eurprd09.prod.outlook.com (10.152.4.60) by DB5EUR01FT009.mail.protection.outlook.com (10.152.4.124) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.557.8 via Frontend Transport; Mon, 1 Aug 2016 15:24:22 +0000 Received: from VI1PR0901MB1501.eurprd09.prod.outlook.com ([10.173.75.149]) by VI1PR0901MB1501.eurprd09.prod.outlook.com ([10.173.75.149]) with mapi id 15.01.0549.022; Mon, 1 Aug 2016 15:24:20 +0000 From: Piotr Stefaniak To: Bruce Evans , Xin Li CC: "svn-src-head@freebsd.org" , "d@delphij.net" , "svn-src-all@freebsd.org" , "Pedro F. Giffuni" , "src-committers@freebsd.org" Subject: Re: svn commit: r303600 - head/usr.bin/indent Thread-Topic: svn commit: r303600 - head/usr.bin/indent Thread-Index: AQHR63OmbbYorJJhE0SA7k5BvSoecKAzlDUAgAALBoCAAJtagA== Date: Mon, 1 Aug 2016 15:24:20 +0000 Message-ID: References: <201607312136.u6VLaeRb058693@repo.freebsd.org> <8d6114b7-cd71-239a-dcc4-03a6d568482c@delphij.net> <20160801155148.I884@besplex.bde.org> In-Reply-To: <20160801155148.I884@besplex.bde.org> Accept-Language: pl-PL, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=softfail (sender IP is 10.152.4.60) smtp.mailfrom=piotr-stefaniak.me; optusnet.com.au; dkim=none (message not signed) header.d=none;optusnet.com.au; dmarc=none action=none header.from=piotr-stefaniak.me; received-spf: SoftFail (protection.outlook.com: domain of transitioning piotr-stefaniak.me discourages use of 10.152.4.60 as permitted sender) x-ms-exchange-messagesentrepresentingtype: 1 x-eopattributedmessage: 0 x-forefront-antispam-report: CIP:10.152.4.60; IPV:NLI; CTRY:; EFV:NLI; SFV:NSPM; SFS:(10019020)(98900003); DIR:OUT; SFP:1102; SCL:1; SRVR:DB5EUR01HT225; H:VI1PR0901MB1501.eurprd09.prod.outlook.com; FPR:; SPF:None; LANG:en; x-microsoft-exchange-diagnostics: 1; DB5EUR01HT225; 6:w63irH8/HRCCI/+SBaGjHTqqr4TXSKhksc8LFpESfMS/9b0dYijc+3opjgYw/ZWjw3UZGq59y6CtxcQEajLVCQmhCVC2KxfSMlDEY/bbvWoeLe237AxOXyw2zvdmdbkE6ddnRsV+aGd1Ik+jkbPPBYW/vRaiAQJjPyho25sBbq+jaIpnpBVw1trn5KXpye7vqBdFY/Yc4UAPKvQzPWgBr5Gs47LRzWBb94wCieNb6LatG7M1hwfUZWGpjxOIz05sQEvbnuZ+4W3xwe5eccC8mbZk+0xHUT9hH5OHRzoBVi60fcj6LJUR8T+pwas6qnyz; 5:tlK97QH5z62+53hhnjnSfn4zaMypD8YD7i6g03OXEjIKqHLdKmqHIsom+baivNLZGnukX5+AQjeQKL3f072cVkUeZUsi0+Te7dpa6h7eFsBUY9hrdACBjuR8bGFK0AuTf1VyW8PNfxM9AaihrAabNQ==; 24:VREy7UpWtTD/TAk4Zc8GmYZ4uOikxlnXnnwv4s/WIykGWRFhYrapE2rZvQeRJyxZ3oPkqo5U3MhI0P2n/JF10ltmPPpvjhyoxf6WKxqq9Lo=; 7:NC+jwTDWDIvS5KALUq5tzgdDXg73xP38mKnapXy3np2rDopaqOhV1BsHFS6rKsbXLeh15i+eyMnvp4Gn0JoBNhsNWBA1CHLtjxNybiYDXslNpV5Sn9ZvZ+9lk3llfcWRtV+8dVVQY2RFgCT3XAMkA6DEG7MHkDyE5JOzpAUJE7tSnBQJ/pL6YaqDifOQW4qD4VJ5NDymOsB3osTEOmeKp8Lbmu+3fzCirL/7tXUguGhNX99QaqfgYnkFcxbzHDra x-ms-office365-filtering-correlation-id: 21c97e3b-62e7-4081-e4b4-08d3ba1fe847 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(1601124038)(1601125047); SRVR:DB5EUR01HT225; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(432015012)(82015046); SRVR:DB5EUR01HT225; BCL:0; PCL:0; RULEID:; SRVR:DB5EUR01HT225; x-forefront-prvs: 0021920B5A spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="Windows-1252" Content-ID: <0130B1D656C4C044A911058F99F73935@eurprd09.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2016 15:24:20.3808 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5EUR01HT225 X-OriginalArrivalTime: 01 Aug 2016 15:24:23.0907 (UTC) FILETIME=[C88D9330:01D1EC08] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2016 15:25:30 -0000 On 2016-08-01 08:08, Bruce Evans wrote: > On Sun, 31 Jul 2016, Xin Li wrote: > >> On 7/31/16 14:36, Pedro F. Giffuni wrote: >>> - bzero(f, sizeof *f); >>> + memset(f, 0, sizeof(struct fstate)); >> ^^^^^^^^^^^^^^^^^^^^^ This is much more error-prone >> than sizeof(*f) IMHO. > > I also prefer bzero(). I hope this is merely a preference and not a hard rule, because I'm of=20 the opinion that the memset()-based equivalent of bzero() has fewer=20 portability consequences, which is worth paying attention to. Please=20 consider the fact that NetBSD has done this replacement. I do agree that replacing the expression with the type name was a=20 regression; it was my mistake. > Removal of the space after sizeof is another regression. KNF disallows > the space, but indent's style is very far from KNF. It isn't clear if > indent's style is to require the space, since old versions of indent > never used sizeof(typename), and 'sizeof object' requires the space. I was specifically asked in the D6966 differential review to adhere to=20 style(9). I have changed both my own code submitted for review and the=20 rest of style violations of this kind as a separate patch=20 (https://github.com/pstef/freebsd_indent/commit/a2befd74fa54c91d96a38317e90= d38ef17682f4b).=20 I had expected the style fixes to get committed before the change in=20 r303600, in belief that doing so would render possible complaints as the=20 one quoted above as not relevant anymore. > Regressions started in r93440 with sizeof(object) in an nitems() expansio= n. > The style of this is very different from an nitems() expansion in r1590. > There was 1 more sizeof(object) and 1 sizeof(int). This is the first > sizeof(typename) where 'sizeof object' cannot be used for technical > reasons. > > KNF also requires parentheses for sizeof(object). Then the space is > unnecessary and disallowed. On a more general note, I imagined we're heading towards slowly changing=20 indent(1)'s code to make it more style(9)-compliant (not least because=20 it's tempting to imagine indent(1) being able to re-indent itself in=20 accordance with style(9) at some point) but right now I'm confused as to=20 what style decisions in the patches I submit are expected of me.