diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-02-07 19:21:42 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-02-07 19:21:42 +0100 |
commit | d06a875b042b608e61b2d5a2bb594641d3e1322f (patch) | |
tree | a4eae99c62b0b2349a42f229ac558e11f2f445d5 /lib/buffer.h | |
parent | 5d414309ec5a01024d4de4c4f9521f8daa5c06ff (diff) |
Filter: Recursive filter iteration code
Add macros for recursive filter iteration that allows to examine
all instructions reachable from a filter.
Diffstat (limited to 'lib/buffer.h')
-rw-r--r-- | lib/buffer.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/buffer.h b/lib/buffer.h index cd9bab86..fd40baa0 100644 --- a/lib/buffer.h +++ b/lib/buffer.h @@ -50,6 +50,8 @@ #define BUFFER_FLUSH(v) ({ (v).used = 0; }) +#define BUFFER_EMPTY(v) ({ (v).used == 0; }) + #define BUFFER_WALK(v,n) \ for (BUFFER_TYPE(v) *_n = (v).data, n; _n < ((v).data + (v).used) && (n = *_n, 1); _n++) |