From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12358 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: alternative form flag with zero octal value Date: Thu, 11 Jan 2018 13:55:34 -0500 Message-ID: <20180111185534.GI1627@brightrain.aerifal.cx> References: <20180111114305.GG1268@lucy.localdomain> <20180111020246.GG1627@brightrain.aerifal.cx> <20180111021750.GH1627@brightrain.aerifal.cx> <20180111091229.3482569b@inria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1515696840 6969 195.159.176.226 (11 Jan 2018 18:54:00 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 11 Jan 2018 18:54:00 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12374-gllmg-musl=m.gmane.org@lists.openwall.com Thu Jan 11 19:53:56 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1eZhz1-0000x1-08 for gllmg-musl@m.gmane.org; Thu, 11 Jan 2018 19:53:47 +0100 Original-Received: (qmail 3294 invoked by uid 550); 11 Jan 2018 18:55:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3258 invoked from network); 11 Jan 2018 18:55:46 -0000 Content-Disposition: inline In-Reply-To: <20180111091229.3482569b@inria.fr> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12358 Archived-At: On Thu, Jan 11, 2018 at 09:12:29AM +0100, Jens Gustedt wrote: > Hello, > seeing this patch, I am somewhat horrified by the coding style that is > applied in that file. > > Comma operator, seriously? Conditionals without proper indentation? > "else" at the end of a line and the depending statement in the next > case? > > If have nothing against clever use of switch cases for such > complicated case analysis, but the coding style should prominently > make this clear and not obfuscate. Yes, there is a good deal of stuff in that file that, in hindsight, I would do somewhat differently. A few of the worst things you noted could be 'fixed' trivially with gotos or compound statatements and probably should be. I don't want a big patch for this file that's hard to review/validate though; the return on time spent is just too small. If anyone does want to push me on making improvements here, small isolated/individual changes that can easily be seen to be correct are the way to go. Rich