change initialization of AVL trees to avoid "strict prototype" warnings

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-01-02 12:10:28 +01:00
parent 65ac9b0711
commit b70e88c16f
3 changed files with 25 additions and 18 deletions

View file

@ -73,7 +73,7 @@ typedef struct ddsi_tcp_listener
}
* ddsi_tcp_listener_t;
static int ddsi_tcp_cmp_conn (const ddsi_tcp_conn_t c1, const ddsi_tcp_conn_t c2)
static int ddsi_tcp_cmp_conn (const struct ddsi_tcp_conn *c1, const struct ddsi_tcp_conn *c2)
{
const os_sockaddr *a1s = (os_sockaddr *)&c1->m_peer_addr;
const os_sockaddr *a2s = (os_sockaddr *)&c2->m_peer_addr;
@ -84,6 +84,11 @@ static int ddsi_tcp_cmp_conn (const ddsi_tcp_conn_t c1, const ddsi_tcp_conn_t c2
return ddsi_ipaddr_compare (a1s, a2s);
}
static int ddsi_tcp_cmp_conn_wrap (const void *a, const void *b)
{
return ddsi_tcp_cmp_conn (a, b);
}
typedef struct ddsi_tcp_node
{
ut_avlNode_t m_avlnode;
@ -95,7 +100,7 @@ static const ut_avlTreedef_t ddsi_tcp_treedef = UT_AVL_TREEDEF_INITIALIZER_INDKE
(
offsetof (struct ddsi_tcp_node, m_avlnode),
offsetof (struct ddsi_tcp_node, m_conn),
ddsi_tcp_cmp_conn,
ddsi_tcp_cmp_conn_wrap,
0
);