]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tcp_metrics; make tables const
authorStephen Hemminger <sthemmin@microsoft.com>
Tue, 6 Mar 2018 21:07:14 +0000 (13:07 -0800)
committerDavid Ahern <dsahern@gmail.com>
Tue, 6 Mar 2018 23:39:02 +0000 (15:39 -0800)
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: David Ahern <dsahern@gmail.com>
ip/tcp_metrics.c

index 7e2d9eb34b799389cf329c8886c72a73fa105c43..5f394765c62b45be4d67b9767c93def362e6db90 100644 (file)
@@ -47,8 +47,8 @@ static int genl_family = -1;
 #define CMD_DEL                0x0002  /* delete, remove               */
 #define CMD_FLUSH      0x0004  /* flush                        */
 
-static struct {
-       char    *name;
+static const struct {
+       const char *name;
        int     code;
 } cmds[] = {
        {       "list",         CMD_LIST        },
@@ -59,7 +59,7 @@ static struct {
        {       "flush",        CMD_FLUSH       },
 };
 
-static char *metric_name[TCP_METRIC_MAX + 1] = {
+static const char *metric_name[TCP_METRIC_MAX + 1] = {
        [TCP_METRIC_RTT]                = "rtt",
        [TCP_METRIC_RTTVAR]             = "rttvar",
        [TCP_METRIC_SSTHRESH]           = "ssthresh",
@@ -67,8 +67,7 @@ static char *metric_name[TCP_METRIC_MAX + 1] = {
        [TCP_METRIC_REORDERING]         = "reordering",
 };
 
-static struct
-{
+static struct {
        int flushed;
        char *flushb;
        int flushp;