diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-04 15:42:15 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-11-04 15:42:15 +0000 |
commit | 70c5a7b68850e825b29b12c672fda71e366f58ff (patch) | |
tree | f100c3558bdf7cbcff45d7156ea5681c4ab4c60a /src/libutil | |
parent | cc2301c1517da93dfe0867a5a91bafae18001e1a (diff) | |
download | rspamd-70c5a7b68850e825b29b12c672fda71e366f58ff.tar.gz rspamd-70c5a7b68850e825b29b12c672fda71e366f58ff.zip |
[Rework] Kill metrics!11
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/mem_pool.c | 2 | ||||
-rw-r--r-- | src/libutil/util.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/src/libutil/mem_pool.c b/src/libutil/mem_pool.c index c9ca42934..103928323 100644 --- a/src/libutil/mem_pool.c +++ b/src/libutil/mem_pool.c @@ -714,7 +714,6 @@ rspamd_mempool_cleanup_tmp (rspamd_mempool_t * pool) { struct _pool_chain *cur; guint i; - gsize len; POOL_MTX_LOCK (); @@ -724,7 +723,6 @@ rspamd_mempool_cleanup_tmp (rspamd_mempool_t * pool) g_atomic_int_add (&mem_pool_stat->bytes_allocated, -((gint)cur->len)); g_atomic_int_add (&mem_pool_stat->chunks_allocated, -1); - len = cur->len + sizeof (struct _pool_chain); g_free (cur); } diff --git a/src/libutil/util.c b/src/libutil/util.c index fe092ad3c..b16040caf 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -1698,8 +1698,8 @@ restart: return 0; } - (void)write (output, "Enter passphrase: ", sizeof ("Enter passphrase: ") - - 1); + g_assert (write (output, "Enter passphrase: ", sizeof ("Enter passphrase: ") - + 1) != -1); /* Save the current sighandler */ for (i = 0; i < NSIG; i++) { @@ -1727,7 +1727,7 @@ restart: } } *p = '\0'; - (void)write (output, "\n", 1); + g_assert (write (output, "\n", 1) == 1); /* Restore terminal state */ if (memcmp (&term, &oterm, sizeof (term)) != 0) { |