Commit f17bd99e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

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

parent cd55aa7f
...@@ -292,6 +292,9 @@ ban_add_lump(const struct ban *b, const void *p, uint32_t len) ...@@ -292,6 +292,9 @@ ban_add_lump(const struct ban *b, const void *p, uint32_t len)
{ {
uint8_t buf[sizeof len]; uint8_t buf[sizeof len];
buf[0] = 0xff;
while (VSB_len(b->vsb) & PALGN)
VSB_bcat(b->vsb, buf, 1);
vbe32enc(buf, len); vbe32enc(buf, len);
VSB_bcat(b->vsb, buf, sizeof buf); VSB_bcat(b->vsb, buf, sizeof buf);
VSB_bcat(b->vsb, p, len); VSB_bcat(b->vsb, p, len);
...@@ -303,6 +306,8 @@ ban_get_lump(const uint8_t **bs) ...@@ -303,6 +306,8 @@ ban_get_lump(const uint8_t **bs)
const void *r; const void *r;
unsigned ln; unsigned ln;
while (**bs == 0xff)
*bs += 1;
ln = vbe32dec(*bs); ln = vbe32dec(*bs);
*bs += 4; *bs += 4;
r = (const void*)*bs; r = (const void*)*bs;
......
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