Return-Path: Received: from mail-pg0-f68.google.com ([74.125.83.68]:34342 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753928AbeCFVHc (ORCPT ); Tue, 6 Mar 2018 16:07:32 -0500 Received: by mail-pg0-f68.google.com with SMTP id m19so22075pgn.1 for ; Tue, 06 Mar 2018 13:07:32 -0800 (PST) From: Stephen Hemminger To: dsahern@gmail.com Cc: netdev@vger.kernel.org, Stephen Hemminger , Stephen Hemminger Subject: [PATCH iproute2-next v2 06/12] tcp_metrics; make tables const Date: Tue, 6 Mar 2018 13:07:14 -0800 Message-Id: <20180306210720.19802-7-stephen@networkplumber.org> In-Reply-To: <20180306210720.19802-1-stephen@networkplumber.org> References: <20180306210720.19802-1-stephen@networkplumber.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Stephen Hemminger Signed-off-by: Stephen Hemminger --- ip/tcp_metrics.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ip/tcp_metrics.c b/ip/tcp_metrics.c index 7e2d9eb34b79..5f394765c62b 100644 --- a/ip/tcp_metrics.c +++ b/ip/tcp_metrics.c @@ -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; -- 2.16.1