On Thu, 2011-12-29 at 14:32 +0100, Lars-Peter Clausen wrote:
> It does not match because there is no mtd_read(&retlen) on all possible paths.
> In your case there are two paths in the switch statement.
> If you'd want it to match anyway you can use a subexpression. e.g.
> '<+...mtd_read(&retlen)...+>'. But this has the downside that retlen might be
> used uninitialized at a later point.

Thanks. I've used the "?" thingy instead, which I understand as "this
line is optional".  But I do not understand what "<+..." means. 
I guess I need to read more docs, any suggestion?

Although when I first read this page:
http://www.emn.fr/z-info/coccinelle/docs/main_grammar004.html

which says "? represents at most one match of the given pattern", I
did not really understand what "?" means. Why not to phrase it in a
more human-friendly way like "? represents an optional match" :-) ?
Or I misunderstand something?

-- 
Best Regards,
Artem Bityutskiy

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to