summaryrefslogtreecommitdiff
path: root/src/common/ers.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-01-24 03:42:16 +0100
committerHaru <haru@dotalux.com>2015-01-24 03:42:36 +0100
commita75714ca455c728d34918dd12200fcec87ebc0d4 (patch)
treed95d174b239a14fafdb8e824bad4a9c81a5a5a80 /src/common/ers.c
parentdf8d6560fc7eb34806d27d28b8b7dbce36868c24 (diff)
downloadhercules-a75714ca455c728d34918dd12200fcec87ebc0d4.tar.gz
hercules-a75714ca455c728d34918dd12200fcec87ebc0d4.tar.bz2
hercules-a75714ca455c728d34918dd12200fcec87ebc0d4.tar.xz
hercules-a75714ca455c728d34918dd12200fcec87ebc0d4.zip
Fixed 18 minor issues
Signed-off-by: Haru <haru@dotalux.com>
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;