Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 30 Mar 2023 09:53:27 -0400
From: Rich Felker <dalias@...c.org>
To: Pascal Cuoq <cuoq@...st-in-soft.com>
Cc: "musl@...ts.openwall.com" <musl@...ts.openwall.com>,
	Matthias Goergens <matthias.goergens@...il.com>
Subject: Re: [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).

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.