From 70c5a7b68850e825b29b12c672fda71e366f58ff Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 4 Nov 2017 15:42:15 +0000 Subject: [Rework] Kill metrics!11 --- src/libutil/mem_pool.c | 2 -- src/libutil/util.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/libutil') 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) { -- cgit v1.2.3