NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/53271: Misplaced parenthese in hme.c



>Number:         53271
>Category:       kern
>Synopsis:       Misplaced parenthese in hme.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 08 10:35:00 +0000 2018
>Originator:     Henning Petersen
>Release:        netbsd-current
>Organization:
>Environment:
>Description:
Misplaced paranthes in hme.c found by cppcheck.
>How-To-Repeat:

>Fix:
diff -u -u -p -r1.96 hme.c
--- sys/dev/ic/hme.c	23 May 2017 02:19:14 -0000	1.96
+++ sys/dev/ic/hme.c	8 May 2018 10:22:16 -0000
@@ -753,7 +753,7 @@ hme_get(struct hme_softc *sc, int ri, ui
 			pktlen = m0->m_pkthdr.len - ETHER_HDR_LEN;
 		} else if (ntohs(eh->ether_type) == ETHERTYPE_VLAN) {
 			evh = (struct ether_vlan_header *)eh;
-			if (ntohs(evh->evl_proto != ETHERTYPE_IP))
+			if (ntohs(evh->evl_proto) != ETHERTYPE_IP)
 				goto swcsum;
 			ip = (struct ip *)((char *)eh + ETHER_HDR_LEN +
 			    ETHER_VLAN_ENCAP_LEN);



Home | Main Index | Thread Index | Old Index