Commit 5dd04941 authored by Nils Goroll's avatar Nils Goroll

First step to vmod code maintenance automation

parent 8c9b944c
This directory contains `coccinelle`_ patches to facilitate code
maintenance.
Each patch should, in a comment section, explain its purpose.
Unless noted otherwise, all patches should work when invoked as::
spatch --dir . --in-place --sp-file $COCCI
.. _coccinelle: http://coccinelle.lip6.fr/
/*
* patch to change code with respect to #2969: Replacement of
* WS_Reserve(ws, sz) by WS_ReserveAll(ws) / WS_ReserveSize(ws, sz)
*
* NOTE this patch does not check/fix error handling:
* - WS_ReserveAll(ws) : Always needs WS_Release(ws, sz)
* - WS_ReserveSize(ws, sz): needs WS_Release(ws, sz) if retval != 0
*/
@@
expression ws;
identifier ptr;
@@
-ptr = WS_Reserve(ws, 0);
+ptr = WS_ReserveAll(ws);
@@
expression ws, sz;
identifier ptr;
@@
-ptr = WS_Reserve(ws, sz);
+ptr = WS_ReserveSize(ws, sz);
......@@ -60,7 +60,8 @@ C APIs (for vmod and utility authors)
It will only leave the workspace reserved if the reservation
request could be fulfilled.
We provide a script to automate this change in the ``coccinelle``
subdirectory of the source tree.
================================
Varnish Cache 6.2.0 (2019-03-15)
......
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