From b8035a604799827729a7b786e3ed1fbf562815ec Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Sat, 7 Oct 2017 09:03:55 +0300 Subject: [PATCH] Order members to ensure alignment 8 + 4 + 4 ensures 16 with 8 byte alignment, which means that 'data' is certain to be 8 byte aligned. 4 + 8 + 4 might result in something else in some funky environment. --- include/maxscale/buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/maxscale/buffer.h b/include/maxscale/buffer.h index 2cd5abe80..cae47b33f 100644 --- a/include/maxscale/buffer.h +++ b/include/maxscale/buffer.h @@ -105,8 +105,8 @@ struct buffer_object_st */ typedef struct { - int32_t refcount; /*< Reference count on the buffer */ buffer_object_t *bufobj; /*< List of objects referred to by GWBUF */ + int32_t refcount; /*< Reference count on the buffer */ uint32_t info; /*< Info bits */ unsigned char data[1]; /*< Actual memory that was allocated */ } SHARED_BUF;