Re: [PATCH/RFC 04/10] ref-filter: skip deref specifier in match_atom_name()
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 1, 2015, 23:11 UTC
- Message-ID
- <CAPig+cTNshvpwn1=VSbnDE8AQMkfKmd1wnP0hNLT1iS3cDEb_A@mail.gmail.com>
- In-Reply-To
- <1447271075-15364-5-git-send-email-Karthik.188@gmail.com>
On Wed, Nov 11, 2015 at 2:44 PM, Karthik Nayak <karthik.188@gmail.com> wrote:
> Signed-off-by: Karthik Nayak <Karthik.188@gmail.com>
A bit of explanation about why this change is desirable would be welcome. I'm guessing it's because a future patch is going to make calls to match_atom_name() with the '*' deref indicator still attached to the name, whereas existing code does not do so.
Show 15 quoted lines
> ---
> diff --git a/ref-filter.c b/ref-filter.c
> @@ -37,6 +37,10 @@ static int match_atom_name(const char *name, const char *atom_name, const char *
> {
> const char *body;
>
> + /* skip the deref specifier*/
> + if (name[0] == '*')
> + name++;
> +
> if (!skip_prefix(name, atom_name, &body))
> return 0; /* doesn't even begin with "atom_name" */
> if (!body[0]) {
> --
> 2.6.2