aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Erickson <gerickson@nuovations.com>2023-12-14 16:58:19 -0800
committerMarcel Holtmann <marcel@holtmann.org>2023-12-15 09:50:48 +0100
commitbfd957d569900def3a82f2b2bd4114bb86d1003e (patch)
tree35aca613d388a58419a76c675b72af91556b621c
parentcce999cdf7005ec14c257076ad730ed90037ff3a (diff)
downloadconnman-bfd957d569900def3a82f2b2bd4114bb86d1003e.tar.gz
inet: Eliminate dead store in 'iproute_default_modify'.
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'.
-rw-r--r--src/inet.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/inet.c b/src/inet.c
index 2abd55ef7..371b33281 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;