[bgpd] Fix compiler warnings related to MD5
This patch fixes:
bgp_network.c: In function 'bgp_md5_set':
bgp_network.c:107: warning: cast from pointer to integer of different size
bgp_network.c: In function 'bgp_socket':
bgp_network.c:447: warning: cast to pointer from integer of different size
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index 99f7113..aa019be 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -104,7 +104,7 @@
*/
for (ALL_LIST_ELEMENTS_RO(bm->listen_sockets, node, socket))
{
- ret = bgp_md5_set_socket ((int )socket, &peer->su, peer->password);
+ ret = bgp_md5_set_socket ((int)(long)socket, &peer->su, peer->password);
if (ret < 0)
fret = ret;
}
@@ -444,7 +444,7 @@
continue;
}
- listnode_add (bm->listen_sockets, (void *)sock);
+ listnode_add (bm->listen_sockets, (void *)(long)sock);
thread_add_read (master, bgp_accept, bgp, sock);
}
while ((ainfo = ainfo->ai_next) != NULL);
@@ -517,7 +517,7 @@
return ret;
}
- listnode_add (bm->listen_sockets, (void *)sock);
+ listnode_add (bm->listen_sockets, (void *)(long)sock);
thread_add_read (bm->master, bgp_accept, bgp, sock);
return sock;