From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17742 invoked from network); 30 Mar 2023 13:53:44 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 30 Mar 2023 13:53:44 -0000 Received: (qmail 21780 invoked by uid 550); 30 Mar 2023 13:53:40 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 21739 invoked from network); 30 Mar 2023 13:53:39 -0000 Date: Thu, 30 Mar 2023 09:53:27 -0400 From: Rich Felker To: Pascal Cuoq Cc: "musl@lists.openwall.com" , Matthias Goergens Message-ID: <20230330135326.GB4163@brightrain.aerifal.cx> References: <20230329151751.392944-1-matthias.goergens@gmail.com> <20230329170418.GD3630668@port70.net> <20230329171643.GE3630668@port70.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] [PATCH] mntent: deal with escaped whitespace in mtab and fstab On Thu, Mar 30, 2023 at 09:29:12AM +0000, Pascal Cuoq wrote: > > > >> sorry missed the < 0. > > > > I made that exact same error when first reading the code. I wonder whether we > > should put the zero in front, to make it clearer to readers? Like `0 > > > fprintf(...` > > As someone who reviews tons of C code from different authors and > application domains, I expect the result of fprintf to be assigned > to a variable and that variable to be used in the return statement. > Anything else will give me pause or be confused for something that > works when it doesn't. OK, but that's not generally a style we use in musl (introducing vars to save a value that will only be used once immediately after it's stored).