From 6dfb376ed3e78868d3cc47ca5e25c77b3219d701 Mon Sep 17 00:00:00 2001 From: compudj Date: Fri, 6 Jan 2006 16:04:26 +0000 Subject: [PATCH] non-alignment fix git-svn-id: http://ltt.polymtl.ca/svn@1451 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/ltt/ltt-private.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ltt/branches/poly/ltt/ltt-private.h b/ltt/branches/poly/ltt/ltt-private.h index 72d2ebf0..89c5e6ce 100644 --- a/ltt/branches/poly/ltt/ltt-private.h +++ b/ltt/branches/poly/ltt/ltt-private.h @@ -456,7 +456,9 @@ static inline unsigned int ltt_align(size_t align_drift, size_t has_alignment) { size_t alignment = min(has_alignment, size_of_type); - + + if(!has_alignement) return 0; + return ((alignment - align_drift) & (alignment-1)); } -- 2.34.1