Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Mar 2000 08:39:14 +0900
From:      "Daniel C. Sobral" <dcs@newsguy.com>
To:        Matthew Dillon <dillon@apollo.backplane.com>
Cc:        Jim Mercer <jim@reptiles.org>, hackers@FreeBSD.ORG
Subject:   Re: Doh, compiler bug... (was Re: possible bug in kernel/if_ether.c)
Message-ID:  <38DAAB22.5430E144@newsguy.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>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthew Dillon wrote:
> 
>     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;
> 
>     I'm committing the fix now.

Funny. The parenthesis was the FIRST thing I noticed. I just assumed I
was remembering the priorities wrong...

--
Daniel C. Sobral			(8-DCS)
dcs@newsguy.com
dcs@freebsd.org
capo@zurichgnomes.bsdconspiracy.net

	One Unix to rule them all, One Resolver to find them,
        One IP to bring them all and in the zone bind them.




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38DAAB22.5430E144>