From: Vitaliy Makkoveev Subject: Re: mrt6_sysctl_mif wrong error declaration To: Alexander Bluhm Cc: tech@openbsd.org Date: Sun, 3 Aug 2025 06:34:36 +0300 On Sat, Aug 02, 2025 at 10:45:28PM +0200, Alexander Bluhm wrote: > Hi, > > Coverity figured out that error declaration shadows global error. > So "if (error) return (error);" further down cannot reached. > > ok? > ok mvs > bluhm > > Index: netinet6/ip6_mroute.c > =================================================================== > RCS file: /data/mirror/openbsd/cvs/src/sys/netinet6/ip6_mroute.c,v > diff -u -p -r1.153 ip6_mroute.c > --- netinet6/ip6_mroute.c 25 Jul 2025 22:24:06 -0000 1.153 > +++ netinet6/ip6_mroute.c 2 Aug 2025 20:41:46 -0000 > @@ -348,8 +348,6 @@ mrt6_sysctl_mif(void *oldp, size_t *oldl > > needed += sizeof(minfo); > if (where && needed <= given) { > - int error; > - > error = copyout(&minfo, where, sizeof(minfo)); > if (error) > break; >