This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v4] Rewrite iconv option parsing [BZ #19519]


On Feb 10 2020, Arjun Shankar wrote:

>> > +# Requires $twobyte input, $c flag, $from, and $to to be set; sets $ret
>> > +execute_test ()
>> > +{
>> > +  PROG=`eval echo $ICONV`
>> 
>> Why do you eval echo through a variable here?
>> 
>> I expect this is due to your use of '' above, remove that and you should
>> be able to use $ICONV directly below.
>
> For the same reason, I've left this bit of code as-is in v5.

That should be

  eval PROG=\"$ICONV\"

Putting echo as the only command inside $() is almost always wrong.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]