]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: Make slabstat_ids local to get_slabstat()
authorPhil Sutter <phil@nwl.cc>
Fri, 2 Dec 2016 10:39:56 +0000 (11:39 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 2 Dec 2016 22:07:46 +0000 (14:07 -0800)
Signed-off-by: Phil Sutter <phil@nwl.cc>
misc/ss.c

index 11101cfb449c2c65cc28d05459e5e61ae27ab974..446a82a45aa5ce7cee3087bd09d6652d69a1bf54 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -601,21 +601,19 @@ struct slabstat {
 
 static struct slabstat slabstat;
 
-static const char *slabstat_ids[] = {
-
-       "sock",
-       "tcp_bind_bucket",
-       "tcp_tw_bucket",
-       "tcp_open_request",
-       "skbuff_head_cache",
-};
-
 static int get_slabstat(struct slabstat *s)
 {
        char buf[256];
        FILE *fp;
        int cnt;
        static int slabstat_valid;
+       static const char * const slabstat_ids[] = {
+               "sock",
+               "tcp_bind_bucket",
+               "tcp_tw_bucket",
+               "tcp_open_request",
+               "skbuff_head_cache",
+       };
 
        if (slabstat_valid)
                return 0;