1 // Script to clean up after ctrl-reply.cocci -- run as a separate step
2 // because cleanup_write2 (even when disabled) somehow prevents the
3 // match rule in ctrl-reply.cocci from matching.
5 // If it doesn't have to be a printf, turn it into a write
11 -control_printf_endreply(E, code, s)
12 +control_write_endreply(E, code, s)
14 // Use send_control_done() instead of explicitly writing it out
17 identifier f != send_control_done;
22 -control_write_endreply(E, 250, "OK")
27 // Clean up more printfs that could be writes
29 // For some reason, including this rule, even disabled, causes the
30 // match rule in ctrl-reply.cocci to fail to match some code that has
31 // %s in its format strings
38 -control_printf_endreply(E1, code, "%s", E2)
39 +control_write_endreply(E1, code, E2)
41 -control_printf_midreply(E1, code, "%s", E2)
42 +control_write_midreply(E1, code, E2)