Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
b474c9cc
Unverified
Commit
b474c9cc
authored
Mar 23, 2021
by
Poul-Henning Kamp
Committed by
Nils Goroll
Nov 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Neuter the VRBT_AUGMENT facility if not used.
parent
1fbe32e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
vtree.h
include/vtree.h
+12
-9
No files found.
include/vtree.h
View file @
b474c9cc
...
...
@@ -370,7 +370,16 @@ struct { \
* from the bottom up to the root, to update augmented node data.
*/
#ifndef VRBT_AUGMENT
#define VRBT_AUGMENT(x) break
#define VRBT_AUGMENT(x) do {} while (0)
#define VRBT_AUGMENT_UP(x) do {} while (0)
#else
#define VRBT_AUGMENT_UP(x) \
do { \
while((x) != NULL) { \
VRBT_AUGMENT(x); \
x = VRBT_PARENT(x, field); \
} \
} while (0)
#endif
#define VRBT_SWAP_CHILD(head, out, in, field) do { \
...
...
@@ -631,10 +640,7 @@ name##_VRBT_REMOVE(struct name *head, struct type *elm) \
VRBT_SET_PARENT(child, parent, field); \
if (parent != NULL) \
name##_VRBT_REMOVE_COLOR(head, parent, child); \
while (parent != NULL) { \
VRBT_AUGMENT(parent); \
parent = VRBT_PARENT(parent, field); \
} \
VRBT_AUGMENT_UP(parent); \
return (old); \
}
...
...
@@ -665,10 +671,7 @@ name##_VRBT_INSERT(struct name *head, struct type *elm) \
else \
VRBT_RIGHT(parent, field) = elm; \
name##_VRBT_INSERT_COLOR(head, elm); \
while (elm != NULL) { \
VRBT_AUGMENT(elm); \
elm = VRBT_PARENT(elm, field); \
} \
VRBT_AUGMENT_UP(elm); \
return (NULL); \
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment