Fix alignment modification
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 17 Nov 2009 19:28:13 +0000 (14:28 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Tue, 17 Nov 2009 19:28:13 +0000 (14:28 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
ltt/ltt-private.h

index 23e94cc5e3de48df4b7b38445293fbc99aeb10d0..5f7919726b6c51300c5f7217ab87c6366bb22045 100644 (file)
@@ -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));
 }
 
 
This page took 0.025105 seconds and 4 git commands to generate.