[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possibly a bug?
From: |
Eric Blake |
Subject: |
Re: Possibly a bug? |
Date: |
Fri, 9 Oct 2015 13:27:59 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 10/09/2015 11:49 AM, Donald Allen wrote:
> Sorry, false alarm. Pilot error -- a quoting problem.
>
> /Don Allen
>
> On Fri, Oct 9, 2015 at 8:57 AM, Donald Allen <address@hidden> wrote:
>> /tmp/testit.m4:
>> define(`First', index($1,`@'))
In case someone else reading doesn't readily spot the quoting error,
this should have been:
define(`First', `index(`$1',`@')')
Without the quotes, the index($1,`@') is expanded prior to passing
arguments to define, and since @ does not appear in the literal string
$1, you end up with the same as if you had done define(`First',`-1').
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature