summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f024106)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
size_t size_of_type,
size_t alignment)
{
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);
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));