netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] iproute2: use named constants instead of number literals to fill rtnl_rtscope_tab
@ 2014-03-07 10:21 Masatake YAMATO
  2014-03-07 10:21 ` [PATCH 2/2] iproute2: use named constants instead of number literals to fill rtnl_rttable_hash Masatake YAMATO
  0 siblings, 1 reply; 3+ messages in thread
From: Masatake YAMATO @ 2014-03-07 10:21 UTC (permalink / raw)
  To: netdev; +Cc: yamato

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-03-10 20:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 10:21 [PATCH 1/2] iproute2: use named constants instead of number literals to fill rtnl_rtscope_tab Masatake YAMATO
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

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).