From 54a15182e05ca757db3bb90a4135e9f8fd3c84f2 Mon Sep 17 00:00:00 2001 From: Chris Caputo Date: Sat, 18 Jul 2009 05:42:34 +0000 Subject: [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 --- bgpd/bgp_network.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c index 99f71138..aa019be6 100644 --- a/bgpd/bgp_network.c +++ b/bgpd/bgp_network.c @@ -104,7 +104,7 @@ bgp_md5_set (struct peer *peer) */ 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 @@ bgp_socket (struct bgp *bgp, unsigned short port, char *address) 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 @@ bgp_socket (struct bgp *bgp, unsigned short port, char *address) 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; -- cgit v1.2.1