From: Grant Erickson <gerickson@nuovations.com>
To: connman@lists.linux.dev
Subject: [PATCH 1/1] inet: Eliminate dead store in 'iproute_default_modify'.
Date: Thu, 14 Dec 2023 16:58:19 -0800 [thread overview]
Message-ID: <20231215005820.2141277-1-gerickson@nuovations.com> (raw)
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(-)
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;
--
2.42.0
next reply other threads:[~2023-12-15 0:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-15 0:58 Grant Erickson [this message]
2023-12-15 8:51 ` [PATCH 1/1] inet: Eliminate dead store in 'iproute_default_modify' Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231215005820.2141277-1-gerickson@nuovations.com \
--to=gerickson@nuovations.com \
--cc=connman@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).