diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-05-25 04:57:44 +0100 |
---|---|---|
committer | Josh Triplett <josh@freedesktop.org> | 2007-05-26 17:41:05 -0700 |
commit | 82c77c00f01c8fa2163f9ea388da107bb8c6f7c1 (patch) | |
tree | ba69efc79b26384865e7575ca57875c74e9c7653 /symbol.c | |
parent | 79c710e888c8e1b35df69df2b49eaad9d7b4eab3 (diff) | |
download | sparse-82c77c00f01c8fa2163f9ea388da107bb8c6f7c1.tar.gz |
fix alignment for _Bool
_Bool ends up with 0 for alignment, which means that _Bool member in a struct
resets the next field offset to 0. Should be (at least) 1...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'symbol.c')
-rw-r--r-- | symbol.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -832,7 +832,7 @@ void init_ctype(void) struct symbol *sym = ctype->ptr; unsigned long bit_size = ctype->bit_size ? *ctype->bit_size : -1; unsigned long maxalign = ctype->maxalign ? *ctype->maxalign : 0; - unsigned long alignment = bit_size >> 3; + unsigned long alignment = (bit_size + 7) >> 3; if (alignment > maxalign) alignment = maxalign; |