diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-08-14 02:08:56 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-08-14 02:08:56 +0200 |
commit | 454829379951cb15d03d7e51ff292addde8548df (patch) | |
tree | 29e6ba865e59d7491fd94a0406a178a2d91adabe /networking/libiproute/iprule.c | |
parent | 34ecc3b7aefdd6c31e8691bd5485037bbabedbd4 (diff) | |
download | busybox-w32-454829379951cb15d03d7e51ff292addde8548df.tar.gz busybox-w32-454829379951cb15d03d7e51ff292addde8548df.tar.bz2 busybox-w32-454829379951cb15d03d7e51ff292addde8548df.zip |
libiproute: eliminate some redundant zero stores
function old new delta
do_iprule 974 955 -19
rtnl_dump_request 173 146 -27
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-46) Total: -46 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/libiproute/iprule.c')
-rw-r--r-- | networking/libiproute/iprule.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/networking/libiproute/iprule.c b/networking/libiproute/iprule.c index dba64346f..c486834b0 100644 --- a/networking/libiproute/iprule.c +++ b/networking/libiproute/iprule.c | |||
@@ -197,9 +197,11 @@ static int iprule_modify(int cmd, char **argv) | |||
197 | req.n.nlmsg_flags = NLM_F_REQUEST; | 197 | req.n.nlmsg_flags = NLM_F_REQUEST; |
198 | req.r.rtm_family = preferred_family; | 198 | req.r.rtm_family = preferred_family; |
199 | req.r.rtm_protocol = RTPROT_BOOT; | 199 | req.r.rtm_protocol = RTPROT_BOOT; |
200 | req.r.rtm_scope = RT_SCOPE_UNIVERSE; | 200 | if (RT_SCOPE_UNIVERSE != 0) |
201 | req.r.rtm_table = 0; | 201 | req.r.rtm_scope = RT_SCOPE_UNIVERSE; |
202 | req.r.rtm_type = RTN_UNSPEC; | 202 | /*req.r.rtm_table = 0; - already is */ |
203 | if (RTN_UNSPEC != 0) | ||
204 | req.r.rtm_type = RTN_UNSPEC; | ||
203 | 205 | ||
204 | if (cmd == RTM_NEWRULE) { | 206 | if (cmd == RTM_NEWRULE) { |
205 | req.n.nlmsg_flags |= NLM_F_CREATE|NLM_F_EXCL; | 207 | req.n.nlmsg_flags |= NLM_F_CREATE|NLM_F_EXCL; |