From 58ed50ee25ab14c6c0e840aa7a5262b5946c2260 Mon Sep 17 00:00:00 2001 From: Masatake YAMATO Date: Fri, 7 Mar 2014 19:21:36 +0900 Subject: [PATCH] iproute2: use named constants instead of number literals to fill rtnl_rtscope_tab Signed-off-by: Masatake YAMATO --- 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 67e4c49f..b005a64e 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); }