From: Willy Tarreau <w@1wt.eu>
To: Christian Kujau <christian@g-house.de>
Cc: "Julio M. Merino Vidal" <jmerino@ac.upc.edu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove bashisms from scripts/extract-ikconfig
Date: Sat, 9 Jun 2007 21:53:35 +0200 [thread overview]
Message-ID: <20070609195333.GR943@1wt.eu> (raw)
In-Reply-To: <alpine.DEB.0.99.0706092132200.8312@foobar-g4>
On Sat, Jun 09, 2007 at 09:34:36PM +0200, Christian Kujau wrote:
> On Sat, 9 Jun 2007, Julio M. Merino Vidal wrote:
> >Wouldn't this be better expressed as:
> >
> > start=$(($start + 8))
> > size=$(($end - $start))
> >
> >to avoid invoking a subshell?
>
> This is certainly possible for lots for scripts, but was not the "scope"
> of this patch. ` is not bash-specific and does not break anything.
That's wrong. It will now require "expr" to be present and working on
the machine, eventhough it's certainly needed for other parts of the
kernel. Also, the remaining function will be considerably slower than
what it initially was. If it's called very frequently, it can be a
problem.
I agree with Julio that if you want to fix the code for its bashism,
you should not change its behaviour and stay as much as possible close
to what it initially did.
Also, beware that the "typeset file=y" did another thing : declare "file"
as local to the function. With your change, any global variable called
"file" will have its content wiped after a call to this function. You
should ensure that it is not used anywhere else, or better, change its
name for something less common than "file".
Regards,
Willy
next prev parent reply other threads:[~2007-06-09 19:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-09 19:22 [PATCH] Remove bashisms from scripts/extract-ikconfig Christian Kujau
2007-06-09 19:26 ` Julio M. Merino Vidal
2007-06-09 19:34 ` Christian Kujau
2007-06-09 19:39 ` Julio M. Merino Vidal
2007-06-09 19:53 ` Willy Tarreau [this message]
2007-06-09 20:14 ` Christian Kujau
2007-11-14 23:44 ` Randy Dunlap
-- strict thread matches above, loose matches on Subject: below --
2008-11-12 18:39 [PATCH] remove " Werner Almesberger
2008-11-12 19:13 ` Randy Dunlap
2008-11-22 11:24 ` Sam Ravnborg
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=20070609195333.GR943@1wt.eu \
--to=w@1wt.eu \
--cc=christian@g-house.de \
--cc=jmerino@ac.upc.edu \
--cc=linux-kernel@vger.kernel.org \
/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