From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Josef Bacik <josef@toxicpanda.com>, Qu Wenruo <wqu@suse.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: fix a check condition in misc/038
Date: Wed, 5 Jun 2024 20:02:32 +0200 [thread overview]
Message-ID: <20240605180232.GD18508@twin.jikos.cz> (raw)
In-Reply-To: <b06a8ffc-f45b-4bf3-a5b3-64877771a549@gmx.com>
On Wed, Jun 05, 2024 at 07:38:39AM +0930, Qu Wenruo wrote:
> >> -[ "$main_root_ptr" -ne "$backup_new_root_ptr" ] || _fail "Backup 2 not overwritten"
> >> +if [ "$main_root_ptr" -ne "$backup_new_root_ptr" ]; then
> >> + _fail "Backup ${slot_num} not overwritten"
> >
> > Don't we prefer just "$slot_num"? I feel like I've gotten yelld at for this
> > before. Just change the existing thing to be correct
>
> I thought we prefer ${} to be more safe, but since it's followed by a
> space, it should be no difference.
The thing that I ask for is to quote all variables, otherwise the _ in
variable name is recognized so ${two_words} is the same as $two_words.
Where it would matter is if _ follows the variable, otherwise no ${ }.
prev parent reply other threads:[~2024-06-05 18:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-04 6:00 [PATCH] btrfs-progs: fix a check condition in misc/038 Qu Wenruo
2024-06-04 15:54 ` Josef Bacik
2024-06-04 22:08 ` Qu Wenruo
2024-06-05 18:02 ` David Sterba [this message]
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=20240605180232.GD18508@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo.btrfs@gmx.com \
--cc=wqu@suse.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox