netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masatake YAMATO <yamato@redhat.com>
To: netdev@vger.kernel.org
Cc: yamato@redhat.com
Subject: [PATCH 1/2] iproute2: use named constants instead of number literals to fill rtnl_rtscope_tab
Date: Fri,  7 Mar 2014 19:21:36 +0900	[thread overview]
Message-ID: <1394187697-1147-1-git-send-email-yamato@redhat.com> (raw)

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
---
 lib/rt_names.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/rt_names.c b/lib/rt_names.c
index 67e4c49..b005a64 100644
--- a/lib/rt_names.c
+++ b/lib/rt_names.c
@@ -194,10 +194,10 @@ static int rtnl_rtscope_init;
 static void rtnl_rtscope_initialize(void)
 {
 	rtnl_rtscope_init = 1;
-	rtnl_rtscope_tab[255] = "nowhere";
-	rtnl_rtscope_tab[254] = "host";
-	rtnl_rtscope_tab[253] = "link";
-	rtnl_rtscope_tab[200] = "site";
+	rtnl_rtscope_tab[RT_SCOPE_NOWHERE] = "nowhere";
+	rtnl_rtscope_tab[RT_SCOPE_HOST]    = "host";
+	rtnl_rtscope_tab[RT_SCOPE_LINK]    = "link";
+	rtnl_rtscope_tab[RT_SCOPE_SITE]    = "site";
 	rtnl_tab_initialize(CONFDIR "/rt_scopes",
 			    rtnl_rtscope_tab, 256);
 }
-- 
1.8.5.3

             reply	other threads:[~2014-03-07 10:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 10:21 Masatake YAMATO [this message]
2014-03-07 10:21 ` [PATCH 2/2] iproute2: use named constants instead of number literals to fill rtnl_rttable_hash Masatake YAMATO
2014-03-10 20:23   ` Stephen Hemminger

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=1394187697-1147-1-git-send-email-yamato@redhat.com \
    --to=yamato@redhat.com \
    --cc=netdev@vger.kernel.org \
    /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 NNTP newsgroup(s).