Hi, thanks for help! On Thu, 2011-12-29 at 14:18 +0100, Arie Middelkoop wrote: > I guess that if you turn it into a statement by adding the semicolon, then > maybe also your question 1 disappears?
Yes, helps. > > 3. Why "mtdchar_read3()" does not match? > > That probably has to do with the fact that there is an execution path > in that function that does not include mtd_read() call (your 'case > 2'). > You probably have to use one of the special '...', like '... when any' > or '.. when exists', but I'd have to lookup which one was which again. Ok, thanks, good to know. "... when exists" does solve the issue. However, I want to also have the "!= retlen" constraint, and coccinelle does not seem to combine both "exists" and "!= retlen". So I ended up with the "?" sign as Julia and Lars-Peter have suggested: @@ identifier retlen; @@ - retlen = 0; ... when != retlen ?mtd_read(&retlen) Thanks! -- Best Regards, Artem Bityutskiy
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)
