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.
This commit is contained in:
Johan Wikman
2017-10-07 09:03:55 +03:00
parent 4ddd9c9ec5
commit 1e2ef0be70

View File

@ -105,8 +105,8 @@ struct buffer_object_st
*/ */
typedef struct typedef struct
{ {
int32_t refcount; /*< Reference count on the buffer */
buffer_object_t *bufobj; /*< List of objects referred to by GWBUF */ buffer_object_t *bufobj; /*< List of objects referred to by GWBUF */
int32_t refcount; /*< Reference count on the buffer */
uint32_t info; /*< Info bits */ uint32_t info; /*< Info bits */
unsigned char data[1]; /*< Actual memory that was allocated */ unsigned char data[1]; /*< Actual memory that was allocated */
} SHARED_BUF; } SHARED_BUF;