]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iproute2: use named constants instead of number literals to fill rtnl_rtscope_tab
authorMasatake YAMATO <yamato@redhat.com>
Fri, 7 Mar 2014 10:21:36 +0000 (19:21 +0900)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 10 Mar 2014 20:16:07 +0000 (13:16 -0700)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
lib/rt_names.c

index 67e4c49f44d28759af4fee5603a52402bd3c1049..b005a64e5207afdd34d43f0848a5d06b09173d29 100644 (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);
 }