summaryrefslogtreecommitdiff
path: root/src/common/ers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/ers.c')
-rw-r--r--src/common/ers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/ers.c b/src/common/ers.c
index 489d8f7ae..52cba0fe5 100644
--- a/src/common/ers.c
+++ b/src/common/ers.c
@@ -308,8 +308,11 @@ ERS *ers_new(uint32 size, char *name, enum ERSOptions options)
CREATE(instance,struct ers_instance_t, 1);
size += sizeof(struct ers_list);
+
+#if ERS_ALIGNED > 1 // If it's aligned to 1-byte boundaries, no need to bother.
if (size % ERS_ALIGNED)
size += ERS_ALIGNED - size % ERS_ALIGNED;
+#endif
instance->VTable.alloc = ers_obj_alloc_entry;
instance->VTable.free = ers_obj_free_entry;