Message ID | 20231215005820.2141277-1-gerickson@nuovations.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
Series | [1/1] inet: Eliminate dead store in 'iproute_default_modify'. | expand |
Hi Grant, > In 'iproute_default_modify' there is a dead store to > 'rth.req.u.r.rt.rtm_scope' with 'RT_SCOPE_NOWHERE' only to be > overwritten two lines later with 'RT_SCOPE_UNIVERSE' without an > intervening read. > > This eliminates the dead store of 'RT_SCOPE_NOWHERE'. > --- > src/inet.c | 1 - > 1 file changed, 1 deletion(-) patch has been applied. Regards Marcel
diff --git a/src/inet.c b/src/inet.c index 2abd55ef75e9..371b3328175f 100644 --- a/src/inet.c +++ b/src/inet.c @@ -4547,7 +4547,6 @@ static int iproute_default_modify(int cmd, uint32_t table_id, uint32_t metric, rth.req.n.nlmsg_type = cmd; rth.req.u.r.rt.rtm_family = family; rth.req.u.r.rt.rtm_table = RT_TABLE_MAIN; - rth.req.u.r.rt.rtm_scope = RT_SCOPE_NOWHERE; rth.req.u.r.rt.rtm_protocol = RTPROT_BOOT; rth.req.u.r.rt.rtm_scope = RT_SCOPE_UNIVERSE; rth.req.u.r.rt.rtm_type = RTN_UNICAST;