I have a macro in C, say LOG()
, which prints given string. The macro adds "\n"
at the end. Because of this, if we have LOG("hello\n")
, the new line is redundant.
How can I find such macro with newline at the end with coccinelle and remove it?
BTW, LOG()
takes format and args just like printf()
.