diff options
author | Andrew Tridgell <tridge@samba.org> | 2006-12-19 12:07:07 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2006-12-19 12:07:07 +1100 |
commit | a3f91ddf57ea1fa4159cdad47a604770670f5a08 (patch) | |
tree | 61aec15b87782d4e58af74043e32919b2f0392b9 /ctdb/tcp/tcp_init.c | |
parent | 3c097c9a5fef7a6aa231173cf970b8f6bb11cc82 (diff) | |
download | samba-a3f91ddf57ea1fa4159cdad47a604770670f5a08.tar.gz samba-a3f91ddf57ea1fa4159cdad47a604770670f5a08.tar.xz samba-a3f91ddf57ea1fa4159cdad47a604770670f5a08.zip |
enforce the tcp memory alignment in packet queue
(This used to be ctdb commit 222f53a3205509a45fbc3267297521df22a414ec)
Diffstat (limited to 'ctdb/tcp/tcp_init.c')
-rw-r--r-- | ctdb/tcp/tcp_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/tcp/tcp_init.c b/ctdb/tcp/tcp_init.c index fca6506676..f261d0c7da 100644 --- a/ctdb/tcp/tcp_init.c +++ b/ctdb/tcp/tcp_init.c @@ -72,7 +72,7 @@ void *ctdb_tcp_allocate_pkt(struct ctdb_context *ctdb, size_t size) /* tcp transport needs to round to 8 byte alignment to ensure that we can use a length header and 64 bit elements in structures */ - size = (size+7) & ~7; + size = (size+(CTDB_TCP_ALIGNMENT-1)) & ~(CTDB_TCP_ALIGNMENT-1); return talloc_size(ctdb, size); } |