We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cd141b commit 949a8e8Copy full SHA for 949a8e8
1 file changed
bin/varnishd/cache/cache_hash.c
@@ -93,17 +93,23 @@ VCF_RETURNS()
93
94
/*---------------------------------------------------------------------*/
95
96
-static struct objhead *
97
-hsh_newobjhead(void)
+static void
+hsh_initobjhead(struct objhead *oh)
98
{
99
- struct objhead *oh;
100
101
- ALLOC_OBJ(oh, OBJHEAD_MAGIC);
102
XXXAN(oh);
+ INIT_OBJ(oh, OBJHEAD_MAGIC);
103
oh->refcnt = 1;
104
VTAILQ_INIT(&oh->objcs);
105
VTAILQ_INIT(&oh->waitinglist);
106
Lck_New(&oh->mtx, lck_objhdr);
+}
107
+
108
+static struct objhead *
109
+hsh_newobjhead(void)
110
+{
111
+ struct objhead *oh = malloc(sizeof *oh);
112
+ hsh_initobjhead(oh);
113
return (oh);
114
}
115
0 commit comments