r2876 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Jul 1 21:31:16 CEST 2008
Author: phk
Date: 2008-07-01 21:31:16 +0200 (Tue, 01 Jul 2008)
New Revision: 2876
Modified:
trunk/varnish-cache/bin/varnishd/cache_dir_simple.c
Log:
Polish: use mini_obj.h
Modified: trunk/varnish-cache/bin/varnishd/cache_dir_simple.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_dir_simple.c 2008-07-01 19:30:54 UTC (rev 2875)
+++ trunk/varnish-cache/bin/varnishd/cache_dir_simple.c 2008-07-01 19:31:16 UTC (rev 2876)
@@ -73,7 +73,8 @@
CAST_OBJ_NOTNULL(vs, d->priv, VDI_SIMPLE_MAGIC);
VBE_DropRef(vs->backend);
- free(vs);
+ vs->dir.magic = 0;
+ FREE_OBJ(vs);
}
void
@@ -83,9 +84,8 @@
(void)cli;
- vs = calloc(sizeof *vs, 1);
+ ALLOC_OBJ(vs, VDI_SIMPLE_MAGIC);
XXXAN(vs);
- vs->magic = VDI_SIMPLE_MAGIC;
vs->dir.magic = DIRECTOR_MAGIC;
vs->dir.priv = vs;
vs->dir.name = "simple";
More information about the varnish-commit
mailing list