From owner-freebsd-hackers Thu Mar 23 11:42:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from ns.yogotech.com (ns.yogotech.com [206.127.79.126]) by hub.freebsd.org (Postfix) with ESMTP id D78F437BA8D for ; Thu, 23 Mar 2000 11:42:44 -0800 (PST) (envelope-from nate@yogotech.com) Received: from nomad.yogotech.com (nomad.yogotech.com [206.127.79.115]) by ns.yogotech.com (8.9.3/8.9.3) with ESMTP id MAA22649; Thu, 23 Mar 2000 12:42:21 -0700 (MST) (envelope-from nate@nomad.yogotech.com) Received: (from nate@localhost) by nomad.yogotech.com (8.8.8/8.8.8) id MAA04132; Thu, 23 Mar 2000 12:42:21 -0700 (MST) (envelope-from nate) Date: Thu, 23 Mar 2000 12:42:21 -0700 (MST) Message-Id: <200003231942.MAA04132@nomad.yogotech.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Matthew Dillon Cc: Jim Mercer , hackers@FreeBSD.ORG Subject: Re: Doh, compiler bug... (was Re: possible bug in kernel/if_ether.c) In-Reply-To: <200003231855.KAA02948@apollo.backplane.com> References: <20000322225639.T983@reptiles.org> <200003230515.VAA96507@apollo.backplane.com> <20000323054731.W983@reptiles.org> <200003231829.KAA02591@apollo.backplane.com> <200003231855.KAA02948@apollo.backplane.com> X-Mailer: VM 6.34 under 19.16 "Lille" XEmacs Lucid Reply-To: nate@yogotech.com (Nate Williams) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > I found it. The code itself is broken. I missed the lack of parens. > > if (m->m_len < sizeof(struct arphdr) && > (m = m_pullup(m, sizeof(struct arphdr)) == NULL)) { > log(LOG_ERR, "arp: runt packet -- m_pullup failed."); > continue; > > > Should be: > > if (m->m_len < sizeof(struct arphdr) && > ((m = m_pullup(m, sizeof(struct arphdr))) == NULL)) { > log(LOG_ERR, "arp: runt packet -- m_pullup failed."); > continue; Umm, I see what you've done, but doesn't == have greater precedence than &&, so the code was fine as it was, wasn't it? Nate To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message