From 34a1b5b258f1f016e39f13d7ad8397b447a24e57 Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Wed, 29 Mar 2017 21:04:39 +0000 Subject: [PATCH] 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 --- usr.sbin/rrenumd/parser.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/rrenumd/parser.y b/usr.sbin/rrenumd/parser.y index 6436df709b2e..d2b06adf84c1 100644 --- a/usr.sbin/rrenumd/parser.y +++ b/usr.sbin/rrenumd/parser.y @@ -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;