CLEANUP: tcpcheck: use pool_zalloc() instead of pool_alloc+memset
Two places used to alloc then zero the area, let's have the allocator do it.
diff --git a/src/tcpcheck.c b/src/tcpcheck.c
index 90f1ee9..52b47ee 100644
--- a/src/tcpcheck.c
+++ b/src/tcpcheck.c
@@ -3618,9 +3618,8 @@
struct tcpcheck_rule *tcpcheck, *prev_check;
struct tcpcheck_expect *expect;
- if ((tcpcheck = pool_alloc(pool_head_tcpcheck_rule)) == NULL)
+ if ((tcpcheck = pool_zalloc(pool_head_tcpcheck_rule)) == NULL)
return 0;
- memset(tcpcheck, 0, sizeof(*tcpcheck));
tcpcheck->action = TCPCHK_ACT_EXPECT;
expect = &tcpcheck->expect;
@@ -3661,9 +3660,8 @@
char *dst;
int i;
- if ((tcpcheck = pool_alloc(pool_head_tcpcheck_rule)) == NULL)
+ if ((tcpcheck = pool_zalloc(pool_head_tcpcheck_rule)) == NULL)
return 0;
- memset(tcpcheck, 0, sizeof(*tcpcheck));
tcpcheck->action = TCPCHK_ACT_SEND;
send = &tcpcheck->send;