Re: [PATCH v2 05/11] ref-filter: skip deref specifier in match_atom_name()
On Thu, Dec 17, 2015 at 2:41 AM, Eric Sunshine wrote: > On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak wrote: >> In upcoming patches we make calls to match_atom_name() with the '*' >> deref specifier still attached to the atom name. This causes >> undesirable errors, hence, if present skip over the '*' deref >> specifier in the atom name. > > I'd drop the second sentence since it doesn't add much or any value. > Instead, you might want to explain that skipping '*' is done as a > convenience. > > 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. > Thanks will put that in. >> Signed-off-by: Karthik Nayak >> --- >> 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*/ > > Too many spaces before "skip". > Too few spaces after "specifier". > Will fix. -- Regards, Karthik Nayak -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 05/11] ref-filter: skip deref specifier in match_atom_name()
On Wed, Dec 16, 2015 at 10:29 AM, Karthik Nayak wrote: > In upcoming patches we make calls to match_atom_name() with the '*' > deref specifier still attached to the atom name. This causes > undesirable errors, hence, if present skip over the '*' deref > specifier in the atom name. I'd drop the second sentence since it doesn't add much or any value. Instead, you might want to explain that skipping '*' is done as a convenience. 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. > Signed-off-by: Karthik Nayak > --- > 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*/ Too many spaces before "skip". Too few spaces after "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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v2 05/11] ref-filter: skip deref specifier in match_atom_name()
In upcoming patches we make calls to match_atom_name() with the '*' deref specifier still attached to the atom name. This causes undesirable errors, hence, if present skip over the '*' deref specifier in the atom name. Signed-off-by: Karthik Nayak --- ref-filter.c | 4 1 file changed, 4 insertions(+) diff --git a/ref-filter.c b/ref-filter.c index f4a6414..7d33b83 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 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html