• Julia Lawall's avatar
    Reduce Coccinelle choices in string_choices.cocci · 4003ba66
    Julia Lawall authored
    The isomorphism neg_if_exp negates the test of a ?: conditional,
    making it unnecessary to have an explicit case for a negated test
    with the branches inverted.
    
    At the same time, we can disable neg_if_exp in cases where a
    different API function may be more suitable for a negated test.
    
    Finally, in the non-patch cases, E matches an expression with
    parentheses around it, so there is no need to mention ()
    explicitly in the pattern.  The () are still needed in the patch
    cases, because we want to drop them, if they are present.
    Signed-off-by: default avatarJulia Lawall <Julia.Lawall@inria.fr>
    4003ba66
string_choices.cocci 5.9 KB