mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: Pascal Cuoq <cuoq@trust-in-soft.com>
Cc: "musl@lists.openwall.com" <musl@lists.openwall.com>,
	Matthias Goergens <matthias.goergens@gmail.com>
Subject: Re: [musl] [PATCH] mntent: deal with escaped whitespace in mtab and fstab
Date: Thu, 30 Mar 2023 09:53:27 -0400	[thread overview]
Message-ID: <20230330135326.GB4163@brightrain.aerifal.cx> (raw)
In-Reply-To: <AF96C6E1-E750-4E1A-BE5B-0987460C6296@trust-in-soft.com>

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).

  reply	other threads:[~2023-03-30 13:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-29 15:17 Matthias Goergens
2023-03-29 17:04 ` Szabolcs Nagy
2023-03-29 17:16   ` Szabolcs Nagy
2023-03-30  8:14     ` Matthias Görgens
2023-03-30  9:29       ` Pascal Cuoq
2023-03-30 13:53         ` Rich Felker [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-03-30  9:23 Matthias Goergens
2023-03-29  8:46 Matthias Goergens
2023-03-29  8:38 Matthias Görgens

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230330135326.GB4163@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=cuoq@trust-in-soft.com \
    --cc=matthias.goergens@gmail.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).