cvs commit: src/sys/netinet6 in6.c

Dmitry Pryanishnikov dmitry at atlantis.dp.ua
Wed Feb 8 06:50:45 PST 2006



Hello!

> Date:      Wed, 8 Feb 2006 07:16:46 +0000 (UTC)
> From:      "George V. Neville-Neil" <gnn at FreeBSD.org>
>
> gnn         2006-02-08 07:16:46 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/netinet6         in6.c
>  Log:
>  Fix for an inappropriate bzero of the ICMPv6 stats.  The code was zero'ing 
> the wrong structure member but setting the correct one.

     Now we have the following code here:

   bzero(&ifr->ifr_ifru.ifru_icmp6stat,
           sizeof(ifr->ifr_ifru.ifru_icmp6stat));
   ifr->ifr_ifru.ifru_icmp6stat =
           *((struct in6_ifextra *)ifp->if_afdata[AF_INET6])->icmp6_ifstat;

I don't understand what's the point of bzero()'ing this object (struct 
in6_ifextra, as I see) just before assignment? Doesn't the second statement
overwrite _all significant_ result of the first one?

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE


More information about the cvs-src mailing list