Commit b8ee449f authored by Dridi Boukelmoune's avatar Dridi Boukelmoune Committed by Poul-Henning Kamp

New replace.cocci semantic patch

parent 52237ffc
/*
* This patch simplifies code using the REPLACE() macro.
*/
@@
expression ptr, val;
@@
- free(ptr);
- ptr = strdup(val);
- AN(ptr);
+ REPLACE(ptr, val);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment