r4446 - trunk/varnish-cache/include
phk at projects.linpro.no
phk at projects.linpro.no
Tue Jan 12 11:03:38 CET 2010
Author: phk
Date: 2010-01-12 11:03:37 +0100 (Tue, 12 Jan 2010)
New Revision: 4446
Modified:
trunk/varnish-cache/include/vbm.h
Log:
Use assert(foo != NULL) rather than AN() to make this usable
outside varnishd.
Modified: trunk/varnish-cache/include/vbm.h
===================================================================
--- trunk/varnish-cache/include/vbm.h 2010-01-11 14:56:52 UTC (rev 4445)
+++ trunk/varnish-cache/include/vbm.h 2010-01-12 10:03:37 UTC (rev 4446)
@@ -56,7 +56,7 @@
bit += VBITMAP_LUMP - 1;
bit -= (bit % VBITMAP_LUMP);
p = realloc(vb->bits, bit / 8);
- AN(p);
+ assert(p != NULL);
memset(p + vb->nbits / 8, 0, (bit - vb->nbits) / 8);
vb->bits = (void*)p;
vb->nbits = bit;
@@ -68,7 +68,7 @@
struct vbitmap *vb;
vb = calloc(sizeof *vb, 1);
- AN(vb);
+ assert(vb != NULL);
if (initial == 0)
initial = VBITMAP_LUMP;
vbit_expand(vb, initial);
More information about the varnish-commit
mailing list