[master] f17bd99 Brute force align ban-strings, to see if we can make the sparc64 box happy.

Poul-Henning Kamp phk at FreeBSD.org
Sun May 17 18:08:08 CEST 2015


commit f17bd99ef29d1c0cc52c8b4b1233a5cb43738089
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Sun May 17 16:07:30 2015 +0000

    Brute force align ban-strings, to see if we can make the sparc64 box happy.

diff --git a/bin/varnishd/cache/cache_ban.c b/bin/varnishd/cache/cache_ban.c
index e3e65f3..2124c33 100644
--- a/bin/varnishd/cache/cache_ban.c
+++ b/bin/varnishd/cache/cache_ban.c
@@ -292,6 +292,9 @@ ban_add_lump(const struct ban *b, const void *p, uint32_t len)
 {
 	uint8_t buf[sizeof len];
 
+	buf[0] = 0xff;
+	while (VSB_len(b->vsb) & PALGN)
+		VSB_bcat(b->vsb, buf, 1);
 	vbe32enc(buf, len);
 	VSB_bcat(b->vsb, buf, sizeof buf);
 	VSB_bcat(b->vsb, p, len);
@@ -303,6 +306,8 @@ ban_get_lump(const uint8_t **bs)
 	const void *r;
 	unsigned ln;
 
+	while (**bs == 0xff)
+		*bs += 1;
 	ln = vbe32dec(*bs);
 	*bs += 4;
 	r = (const void*)*bs;



More information about the varnish-commit mailing list