From: compudj Date: Fri, 6 Jan 2006 16:04:26 +0000 (+0000) Subject: non-alignment fix X-Git-Tag: v0.12.20~2038 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6dfb376ed3e78868d3cc47ca5e25c77b3219d701;p=lttv.git non-alignment fix git-svn-id: http://ltt.polymtl.ca/svn@1451 04897980-b3bd-0310-b5e0-8ef037075253 --- 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)); }