diff mbox

rstp: Fix compiler type-punning error in rstp daemon

Message ID 20100303135331.GA7211@hmsreliant.think-freely.org
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Neil Horman March 3, 2010, 1:53 p.m. UTC
Hey-
	Was trying to build the rstp daemon today and got a type-punning error
in bridge_track.c.  This patch fixes it up.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


 bridge_track.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/bridge_track.c b/bridge_track.c
index be555de..fa59732 100644
--- a/bridge_track.c
+++ b/bridge_track.c
@@ -599,7 +599,7 @@  void bridge_bpdu_rcv(int if_index, const unsigned char *data, int len)
 		//    TST(ntohs(*(uint16_t*)bpdu.body.message_age)
 		//        < ntohs(*(uint16_t*)bpdu.body.max_age), );
 		TST(memcmp(bpdu->body.bridge_id, &ifc->master->bridge_id, 8) != 0
-		    || (ntohs(*(uint16_t *) bpdu->body.port_id) & 0xfff) !=
+		    || (ntohs((uint16_t) *bpdu->body.port_id) & 0xfff) !=
 		    ifc->port_index,);
 		break;
 	case BPDU_TOPO_CHANGE_TYPE: