On Fri, Dec 16, 2016 at 08:33:55PM +0100, Julia Lawall wrote:
> > Ah.  I think I understand that, Julia.  If I blindly modify the strdup rule 
> > to
> > this:
> >
> >     T = strdup(...);
> >     + if (T == NULL)
> >     +       pkg_emit_errno("strdup", __func__);
> >     ?... when != (T == NULL)
> >     ?    when != (T != NULL)
> 
> The ? doesn't go on the ... line. I'm rather surprised that that would
> parse, even.  Your line in the A position is T = strdup(...);.  So you

spatch certainly didn't mind, and went on to apply the rule.  If I've
uncovered a bug, great!  :)

> need to put another copy of that at the end of the rule with  ? in front
> of it.  So that it stops when it comes to that again.

And now it's working just fine.  Thanks ever so much for all of your help,
Julia, and your continued efforts on Coccinelle; it's a fantastic piece of
software.

Kindly,
Thomas Adam
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to