aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/fstring.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-01 15:08:32 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-01-01 15:48:48 +0000
commit64bbf3cc16c6d9089e2c83fff33379c108f8eac1 (patch)
tree33d722e95a45c2886d482bcc1e0c3ac2ec75a2e4 /src/libutil/fstring.c
parent74be226aad438bf5bdc4612f09c1e9fe8b48ee38 (diff)
downloadrspamd-64bbf3cc16c6d9089e2c83fff33379c108f8eac1.tar.gz
rspamd-64bbf3cc16c6d9089e2c83fff33379c108f8eac1.zip
[Minor] Relax alignment requirements for fstring
Diffstat (limited to 'src/libutil/fstring.c')
-rw-r--r--src/libutil/fstring.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/fstring.c b/src/libutil/fstring.c
index 25eda60e7..88beaf570 100644
--- a/src/libutil/fstring.c
+++ b/src/libutil/fstring.c
@@ -25,7 +25,7 @@ rspamd_fstring_new (void)
{
rspamd_fstring_t *s;
- if (posix_memalign ((void**)&s, 16, default_initial_size + sizeof (*s)) != 0) {
+ if ((s = malloc (default_initial_size + sizeof (*s))) != 0) {
g_error ("%s: failed to allocate %"G_GSIZE_FORMAT" bytes",
G_STRLOC, default_initial_size + sizeof (*s));
@@ -44,7 +44,7 @@ rspamd_fstring_sized_new (gsize initial_size)
rspamd_fstring_t *s;
gsize real_size = MAX (default_initial_size, initial_size);
- if (posix_memalign ((void **)&s, 16, real_size + sizeof (*s)) != 0) {
+ if ((s = malloc (real_size + sizeof (*s))) != 0) {
g_error ("%s: failed to allocate %"G_GSIZE_FORMAT" bytes",
G_STRLOC, real_size + sizeof (*s));
@@ -62,7 +62,7 @@ rspamd_fstring_new_init (const gchar *init, gsize len)
rspamd_fstring_t *s;
gsize real_size = MAX (default_initial_size, len);
- if (posix_memalign ((void **) &s, 16, real_size + sizeof (*s)) != 0) {
+ if ((s = malloc (real_size + sizeof (*s))) != 0) {
g_error ("%s: failed to allocate %"G_GSIZE_FORMAT" bytes",
G_STRLOC, real_size + sizeof (*s));