[experimental-ims] fe9d181 Align the iovec pointer
Geoff Simmons
geoff at varnish-cache.org
Tue Feb 14 17:49:35 CET 2012
commit fe9d181a5276843a77ed41b91919a0f5ef0ead77
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Feb 14 13:50:17 2012 +0000
Align the iovec pointer
diff --git a/bin/varnishd/cache/cache_wrw.c b/bin/varnishd/cache/cache_wrw.c
index 5c4b280..00b3a9e 100644
--- a/bin/varnishd/cache/cache_wrw.c
+++ b/bin/varnishd/cache/cache_wrw.c
@@ -80,9 +80,10 @@ WRW_Reserve(struct worker *wrk, int *fd)
memset(wrw, 0, sizeof *wrw);
wrw->magic = WRW_MAGIC;
u = WS_Reserve(wrk->aws, 0);
+ u = PRNDDN(u);
u /= sizeof(struct iovec);
AN(u);
- wrw->iov = (void*)wrk->aws->f;
+ wrw->iov = (void*)PRNDUP(wrk->aws->f);
wrw->siov = u;
wrw->ciov = u;
wrw->werr = 0;
More information about the varnish-commit
mailing list