Commit 04deea86 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Use assert(foo != NULL) rather than AN() to make this usable

outside varnishd.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4446 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent dcff4376
......@@ -56,7 +56,7 @@ vbit_expand(struct vbitmap *vb, unsigned bit)
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 @@ vbit_init(unsigned initial)
struct vbitmap *vb;
vb = calloc(sizeof *vb, 1);
AN(vb);
assert(vb != NULL);
if (initial == 0)
initial = VBITMAP_LUMP;
vbit_expand(vb, initial);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment