diff options
Diffstat (limited to 'source/include/byteorder.h')
-rw-r--r-- | source/include/byteorder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/include/byteorder.h b/source/include/byteorder.h index b376a8964c4..f050e5d6cfc 100644 --- a/source/include/byteorder.h +++ b/source/include/byteorder.h @@ -263,7 +263,7 @@ it also defines lots of intermediate macros, just ignore those :-) tab_depth(depth), base, string, outbuf)); } /* Alignment macros. */ -#define ALIGN4(p,base) ((4 - (PTR_DIFF((q), (base)) % 4)) & ~3) -#define ALIGN2(p,base) ((2 - (PTR_DIFF((q), (base)) % 2)) & ~1) +#define ALIGN4(p,base) ((p) + ((4 - (PTR_DIFF((p), (base)) % 4)) & ~3)) +#define ALIGN2(p,base) ((p) + ((2 - (PTR_DIFF((p), (base)) % 2)) & ~1)) #endif /* _BYTEORDER_H */ |