Date: Wed, 29 Mar 2017 21:04:39 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316178 - head/usr.sbin/rrenumd Message-ID: <201703292104.v2TL4d32078507@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Wed Mar 29 21:04:39 2017 New Revision: 316178 URL: https://svnweb.freebsd.org/changeset/base/316178 Log: rrenumd(8): Fix a trivial Coverity warning Coverity warns that it is invalid to access following struct members by accessing the current struct member pointer plus one. Assuming the compilers aren't abusing this kind of UB yet, this cleanup isn't a functional change. Reported by: Coverity CID: 1368713 Sponsored by: Dell EMC Isilon Modified: head/usr.sbin/rrenumd/parser.y Modified: head/usr.sbin/rrenumd/parser.y ============================================================================== --- head/usr.sbin/rrenumd/parser.y Wed Mar 29 20:49:41 2017 (r316177) +++ head/usr.sbin/rrenumd/parser.y Wed Mar 29 21:04:39 2017 (r316178) @@ -336,8 +336,8 @@ match_prefix_definition: struct icmp6_router_renum *irr; struct rr_pco_match *rpm; - irr = (struct icmp6_router_renum *)&ple_cur.pl_irr; - rpm = (struct rr_pco_match *)(irr + 1); + irr = &ple_cur.pl_irr; + rpm = &ple_cur.pl_rpm; memset(rpm, 0, sizeof(*rpm)); rpm->rpm_code = $1;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703292104.v2TL4d32078507>