[PATCH v3 07/15] ref-filter: skip deref specifier in match_atom_name()
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jan 5, 2016, 08:03 UTC
- Message-ID
- <1451980994-26865-8-git-send-email-Karthik.188@gmail.com>
- In-Reply-To
- <1451980994-26865-1-git-send-email-Karthik.188@gmail.com>
In upcoming patches we make calls to match_atom_name() with the '*' deref specifier still attached to the atom name. Subsequent patches will call match_atom_name() with the '*' deref specifier still attached to the atom name so, as a convenience, skip over it on their behalf.
Helped-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Karthik Nayak <Karthik.188@gmail.com> --- ref-filter.c | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/ref-filter.c b/ref-filter.c index 575d293..b54c872 100644 --- 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.4