coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] refactor expensive code in misc/stty [was: amendments to bac


From: Jim Meyering
Subject: Re: [PATCH] refactor expensive code in misc/stty [was: amendments to backtick-removing series]
Date: Thu, 19 Apr 2012 19:33:28 +0200

Bernhard Voelker wrote:
...
>> -  case "$REV" in
>> -    "")
>> -      framework_failure_ "stty_reversible_settings() not called?";;
>> +  case $stty_reversible_ in
>> +    '')
>> +      framework_failure_ "stty_reversible_init_() not called?";;
>>      *" $1 "*)
>>        return 0;;
>>      *)
>
> You removed the double quotes around the case variable.

Yes.  That was deliberate.
There is no need for double quotes there,
and in fact I consistently avoid them when the "case"
argument is a simple variable reference, since
they serve no purpose in that context.

Hmm... speaking of consistency,
git grep 'case "\$[a-z]*"' prints 16 lines.
Though that doesn't count things like case $(...),
which don't need double quotes, either.

Contrast that with the 124 matches for this:
  git grep 'case \$'

> For whatever it is good for, I'd have a better feeling if they were
> there ... imagine something goes wrong during the perl processing.
> Maybe that's only my paranoia ;-)
>
> Apart from that, it looks good.

Pushed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]