Extend check_obj.cocci to the trivial base case

does not apply in varnish-cache, but found useful in a vmod
parent f83c1f58
/*
* This patch removes a redundant null check.
* This patch removes a redundant null check and replaces assertions
* on the magic with CHECK_OBJ()
*/
@@
......@@ -11,3 +12,10 @@ if (obj != NULL) {
+ CHECK_OBJ(obj, magic);
...
}
@@
expression obj, magicval;
@@
- assert(obj->magic == magicval);
+ CHECK_OBJ(obj, magicval);
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