From: "Matthias Görgens" <matthias.goergens@gmail.com>
To: Matthias Goergens <matthias.goergens@gmail.com>, musl@lists.openwall.com
Subject: Re: [musl] [PATCH] mntent: deal with escaped whitespace in mtab and fstab
Date: Thu, 30 Mar 2023 16:14:52 +0800 [thread overview]
Message-ID: <CA+X7ob-uxDVcpPw07fwS3NOkpNDyBD6yFEozRNASfA9J3NWLug@mail.gmail.com> (raw)
In-Reply-To: <20230329171643.GE3630668@port70.net>
On Thu, 30 Mar 2023, 01:16 Szabolcs Nagy, <nsz@port70.net> wrote:
>
> * Szabolcs Nagy <nsz@port70.net> [2023-03-29 19:04:18 +0200]:
> > > - return fprintf(f, "%s\t%s\t%s\t%s\t%d\t%d\n",
> > > - mnt->mnt_fsname, mnt->mnt_dir, mnt->mnt_type, mnt->mnt_opts,
> > > - mnt->mnt_freq, mnt->mnt_passno) < 0;
> >
> > the original code has a bug here: fprintf returns number of
> > chars printed but addmntent returns 0 to indicate success.
>
> 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(...`
next prev parent reply other threads:[~2023-03-30 8:15 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 [this message]
2023-03-30 9:29 ` Pascal Cuoq
2023-03-30 13:53 ` Rich Felker
-- 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=CA+X7ob-uxDVcpPw07fwS3NOkpNDyBD6yFEozRNASfA9J3NWLug@mail.gmail.com \
--to=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).