iproute2: use named constants instead of number literals to fill rtnl_rtscope_tab

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
This commit is contained in:
Masatake YAMATO 2014-03-07 19:21:36 +09:00 committed by Stephen Hemminger
parent 39935c9374
commit 58ed50ee25
1 changed files with 4 additions and 4 deletions

View File

@ -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);
}