]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fight lost: alignof -> _Alignof
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 11:53:30 +0000 (12:53 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 9 Jul 2019 11:53:30 +0000 (12:53 +0100)
src/libcryptobox/cryptobox.c
src/libserver/re_cache.c
src/libutil/multipattern.c
src/lua/lua_cryptobox.c

index c8560925d43b179dc7eb04ac5187a6ee0a9064cf..0a3939e5449fb985f16d6f80887e84bb80815ff8 100644 (file)
@@ -576,7 +576,7 @@ static gsize
 rspamd_cryptobox_auth_ctx_len (enum rspamd_cryptobox_mode mode)
 {
        if (G_LIKELY (mode == RSPAMD_CRYPTOBOX_MODE_25519)) {
-               return sizeof (crypto_onetimeauth_state) + alignof (crypto_onetimeauth_state);
+               return sizeof (crypto_onetimeauth_state) + _Alignof (crypto_onetimeauth_state);
        }
        else {
 #ifndef HAVE_USABLE_OPENSSL
@@ -1429,13 +1429,13 @@ rspamd_cryptobox_hash_init (void *p, const guchar *key, gsize keylen)
 {
        if (key != NULL && keylen > 0) {
                crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p,
-                               alignof(crypto_generichash_blake2b_state));
+                               _Alignof(crypto_generichash_blake2b_state));
                crypto_generichash_blake2b_init (st, key, keylen,
                                crypto_generichash_blake2b_BYTES_MAX);
        }
        else {
                crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p,
-                               alignof(crypto_generichash_blake2b_state));
+                               _Alignof(crypto_generichash_blake2b_state));
                crypto_generichash_blake2b_init (st, key, keylen,
                                crypto_generichash_blake2b_BYTES_MAX);
        }
@@ -1448,7 +1448,7 @@ void
 rspamd_cryptobox_hash_update (void *p, const guchar *data, gsize len)
 {
        crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p,
-                       alignof(crypto_generichash_blake2b_state));
+                       _Alignof(crypto_generichash_blake2b_state));
        crypto_generichash_blake2b_update (st, data, len);
 }
 
@@ -1459,7 +1459,7 @@ void
 rspamd_cryptobox_hash_final (void *p, guchar *out)
 {
        crypto_generichash_blake2b_state *st = cryptobox_align_ptr (p,
-                       alignof(crypto_generichash_blake2b_state));
+                       _Alignof(crypto_generichash_blake2b_state));
        crypto_generichash_blake2b_final (st, out, crypto_generichash_blake2b_BYTES_MAX);
 }
 
index 5377e77aecad093d96f637cd1952d339f20ffb3f..5517ad875cabc367626d2fba03a4212cbded863a 100644 (file)
@@ -386,7 +386,7 @@ rspamd_re_cache_init (struct rspamd_re_cache *cache, struct rspamd_config *cfg)
                rspamd_regexp_set_cache_id (re, i);
 
                if (re_class->st == NULL) {
-                       posix_memalign ((void **)&re_class->st, alignof (rspamd_cryptobox_hash_state_t),
+                       posix_memalign ((void **)&re_class->st, _Alignof (rspamd_cryptobox_hash_state_t),
                                        sizeof (*re_class->st));
                        g_assert (re_class->st != NULL);
                        rspamd_cryptobox_hash_init (re_class->st, NULL, 0);
index d353c08e1ab13b886a8b69eb0ecf803a0acb071b..b2cdc66454a172f1ddabfd7731249cdf9095af09 100644 (file)
@@ -242,7 +242,7 @@ rspamd_multipattern_create (enum rspamd_multipattern_flags flags)
        struct rspamd_multipattern *mp;
 
        /* Align due to blake2b state */
-       posix_memalign((void **)&mp, alignof (struct rspamd_multipattern),
+       posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern),
                        sizeof (*mp));
        g_assert (mp != NULL);
        memset (mp, 0, sizeof (*mp));
@@ -271,7 +271,7 @@ rspamd_multipattern_create_sized (guint npatterns,
        struct rspamd_multipattern *mp;
 
        /* Align due to blake2b state */
-       posix_memalign((void **)&mp, alignof (struct rspamd_multipattern), sizeof (*mp));
+       posix_memalign((void **)&mp, _Alignof (struct rspamd_multipattern), sizeof (*mp));
        g_assert (mp != NULL);
        memset (mp, 0, sizeof (*mp));
        mp->flags = flags;
index 125cdab8e33b16591541e8154f21307e91feec01..35faa00376f0e3e9edf4274bed32f11d2cf04f44 100644 (file)
@@ -990,7 +990,7 @@ rspamd_lua_hash_create (const gchar *type)
                }
                else if (g_ascii_strcasecmp (type, "blake2") == 0) {
                        h->type = LUA_CRYPTOBOX_HASH_BLAKE2;
-                       posix_memalign ((void **)&h->content.h, alignof (rspamd_cryptobox_hash_state_t),
+                       posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t),
                                        sizeof (*h->content.h));
                        g_assert (h->content.h != NULL);
                        rspamd_cryptobox_hash_init (h->content.h, NULL, 0);
@@ -1027,7 +1027,7 @@ rspamd_lua_hash_create (const gchar *type)
        }
        else {
                h->type = LUA_CRYPTOBOX_HASH_BLAKE2;
-               posix_memalign ((void **)&h->content.h, alignof (rspamd_cryptobox_hash_state_t),
+               posix_memalign ((void **)&h->content.h, _Alignof (rspamd_cryptobox_hash_state_t),
                                sizeof (*h->content.h));
                g_assert (h->content.h != NULL);
                rspamd_cryptobox_hash_init (h->content.h, NULL, 0);