diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-29 02:36:23 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-09-29 02:36:23 +0400 |
commit | 981b24db5e7ccc289c2e39a2954cf1ff261442b9 (patch) | |
tree | 039ec02a3224e19904768fcfb964bb672c4b04fc /networking/libiproute | |
parent | 54928843119f90b409d177977bac02fdd52d6de0 (diff) |
rt_names.c: move few strings into rodata
Diffstat (limited to 'networking/libiproute')
-rw-r--r-- | networking/libiproute/rt_names.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/networking/libiproute/rt_names.c b/networking/libiproute/rt_names.c index 5181ba4b7..c0f790754 100644 --- a/networking/libiproute/rt_names.c +++ b/networking/libiproute/rt_names.c @@ -16,7 +16,7 @@ #include <stdint.h> #include "rt_names.h" -static void rtnl_tab_initialize(char *file, char **tab, int size) +static void rtnl_tab_initialize(char *file, const char **tab, int size) { char buf[512]; FILE *fp; @@ -51,7 +51,7 @@ static void rtnl_tab_initialize(char *file, char **tab, int size) } -static char * rtnl_rtprot_tab[256] = { +static const char * rtnl_rtprot_tab[256] = { "none", "redirect", "kernel", @@ -96,7 +96,7 @@ const char * rtnl_rtprot_n2a(int id, char *buf, int len) int rtnl_rtprot_a2n(uint32_t *id, char *arg) { - static char *cache = NULL; + static const char *cache = NULL; static unsigned long res; char *end; int i; @@ -128,7 +128,7 @@ int rtnl_rtprot_a2n(uint32_t *id, char *arg) -static char * rtnl_rtscope_tab[256] = { +static const char * rtnl_rtscope_tab[256] = { "global", }; @@ -163,7 +163,7 @@ const char * rtnl_rtscope_n2a(int id, char *buf, int len) int rtnl_rtscope_a2n(uint32_t *id, char *arg) { - static char *cache = NULL; + static const char *cache = NULL; static unsigned long res; char *end; int i; @@ -195,7 +195,7 @@ int rtnl_rtscope_a2n(uint32_t *id, char *arg) -static char * rtnl_rtrealm_tab[256] = { +static const char * rtnl_rtrealm_tab[256] = { "unknown", }; @@ -210,7 +210,7 @@ static void rtnl_rtrealm_initialize(void) int rtnl_rtrealm_a2n(uint32_t *id, char *arg) { - static char *cache = NULL; + static const char *cache = NULL; static unsigned long res; char *end; int i; @@ -242,7 +242,7 @@ int rtnl_rtrealm_a2n(uint32_t *id, char *arg) -static char * rtnl_rtdsfield_tab[256] = { +static const char * rtnl_rtdsfield_tab[256] = { "0", }; @@ -274,7 +274,7 @@ const char * rtnl_dsfield_n2a(int id, char *buf, int len) int rtnl_dsfield_a2n(uint32_t *id, char *arg) { - static char *cache = NULL; + static const char *cache = NULL; static unsigned long res; char *end; int i; @@ -303,4 +303,3 @@ int rtnl_dsfield_a2n(uint32_t *id, char *arg) *id = res; return 0; } - |