From: Mathieu Desnoyers Date: Tue, 17 Nov 2009 19:28:13 +0000 (-0500) Subject: Fix alignment modification X-Git-Tag: v0.12.26~87 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=833e96595f329a9a630ec68aaab3bdb43be76855;p=lttv.git Fix alignment modification Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt/ltt-private.h b/ltt/ltt-private.h index 23e94cc5..5f791972 100644 --- a/ltt/ltt-private.h +++ b/ltt/ltt-private.h @@ -208,13 +208,11 @@ static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type, size_t alignment) { - size_t align_offset = min(alignment, size_of_type); - if(!alignment) return 0; g_assert(size_of_type != 0); - return ((align_offset - align_drift) & (align_offset-1)); + return ((size_of_type - align_drift) & (size_of_type - 1)); }