diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-07 11:27:41 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-07 11:27:41 +0000 |
commit | 45c5ffb0c0840d7c7cd6489e42708ec79df9ab2e (patch) | |
tree | 233ccf03dd25196e1831d6ac91396aaab8f967c5 /src | |
parent | 1c1215868969dc988d522f8858ba9444da8a0997 (diff) | |
download | rspamd-45c5ffb0c0840d7c7cd6489e42708ec79df9ab2e.tar.gz rspamd-45c5ffb0c0840d7c7cd6489e42708ec79df9ab2e.zip |
Fix tests
Diffstat (limited to 'src')
-rw-r--r-- | src/libcryptobox/siphash/ref.c | 8 | ||||
-rw-r--r-- | src/libutil/util.c | 15 |
2 files changed, 8 insertions, 15 deletions
diff --git a/src/libcryptobox/siphash/ref.c b/src/libcryptobox/siphash/ref.c index 1a09f2066..cbd244f5f 100644 --- a/src/libcryptobox/siphash/ref.c +++ b/src/libcryptobox/siphash/ref.c @@ -31,14 +31,6 @@ #define ROTL(x,b) (uint64_t)( ((x) << (b)) | ( (x) >> (64 - (b))) ) -#define U32TO8_LE(p, v) \ - (p)[0] = (uint8_t)((v) ); (p)[1] = (uint8_t)((v) >> 8); \ - (p)[2] = (uint8_t)((v) >> 16); (p)[3] = (uint8_t)((v) >> 24); - -#define U64TO8_LE(p, v) \ - U32TO8_LE((p), (uint32_t)((v) )); \ - U32TO8_LE((p) + 4, (uint32_t)((v) >> 32)); - #if BYTE_ORDER != LITTLE_ENDIAN #define U8TO64_LE(p) \ (((uint64_t)((p)[0]) << 0) | \ diff --git a/src/libutil/util.c b/src/libutil/util.c index 994f475b9..dc9e03201 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1990,15 +1990,16 @@ void rspamd_config_libs (struct rspamd_external_libs_ctx *ctx, struct rspamd_config *cfg) { - g_assert (ctx != NULL); g_assert (cfg != NULL); - if (cfg->local_addrs) { - if (!rspamd_map_add (cfg, cfg->local_addrs, - "Local addresses", rspamd_radix_read, rspamd_radix_fin, - (void **) ctx->local_addrs)) { - radix_add_generic_iplist (cfg->local_addrs, - (radix_compressed_t **)ctx->local_addrs); + if (ctx != NULL) { + if (cfg->local_addrs) { + if (!rspamd_map_add (cfg, cfg->local_addrs, + "Local addresses", rspamd_radix_read, rspamd_radix_fin, + (void **) ctx->local_addrs)) { + radix_add_generic_iplist (cfg->local_addrs, + (radix_compressed_t **)ctx->local_addrs); + } } } } |