mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-16 22:58:02 +00:00
CLEANUP: connection: use pool_zalloc() in conn_alloc_hash_node()
This one used to alloc then zero the area, let's have the allocator do it.
This commit is contained in:
parent
18759079b6
commit
5d110b25dd
@ -376,12 +376,10 @@ static inline struct conn_hash_node *conn_alloc_hash_node(struct connection *con
|
|||||||
{
|
{
|
||||||
struct conn_hash_node *hash_node = NULL;
|
struct conn_hash_node *hash_node = NULL;
|
||||||
|
|
||||||
hash_node = pool_alloc(pool_head_conn_hash_node);
|
hash_node = pool_zalloc(pool_head_conn_hash_node);
|
||||||
if (unlikely(!hash_node))
|
if (unlikely(!hash_node))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memset(&hash_node->node, 0, sizeof(hash_node->node));
|
|
||||||
hash_node->hash = 0;
|
|
||||||
hash_node->conn = conn;
|
hash_node->conn = conn;
|
||||||
|
|
||||||
return hash_node;
|
return hash_node;
|
||||||
|
Loading…
Reference in New Issue
Block a user