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
This commit is contained in:
cem 2017-03-29 21:04:39 +00:00
parent c3e003d2f9
commit 4ea65ca6dd

View File

@ -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;