From 5eb9d11bf6bbe99ce47f929a14ac03351f21fe27 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 10 Dec 2009 15:52:33 +0300 Subject: ripngd: compiler warnings cleanup * ripngd/ripng_interface.c * ripng_check_max_mtu(): unused, sayonara * ripng_interface_down(): cast flag arguments to logging function * ripng_interface_add(): idem * ripng_interface_delete(): idem * ripngd/ripngd.c * ripng_recv_packet(): avoid aliasing warning dereferencing pointer --- ripngd/ripngd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ripngd/ripngd.c') diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c index 9deac032..6e32d83c 100644 --- a/ripngd/ripngd.c +++ b/ripngd/ripngd.c @@ -272,7 +272,10 @@ ripng_recv_packet (int sock, u_char *buf, int bufsize, /* Incoming packet's multicast hop limit. */ if (cmsgptr->cmsg_level == IPPROTO_IPV6 && cmsgptr->cmsg_type == IPV6_HOPLIMIT) - *hoplimit = *((int *) CMSG_DATA (cmsgptr)); + { + int *phoplimit = (int *) CMSG_DATA (cmsgptr); + *hoplimit = *phoplimit; + } } /* Hoplimit check shold be done when destination address is -- cgit v1.2.1