ss: Make slabstat_ids local to get_slabstat()

Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2016-12-02 11:39:56 +01:00 committed by Stephen Hemminger
parent 95eafe438a
commit b3535dd61d

View File

@ -601,21 +601,19 @@ struct slabstat {
static struct slabstat 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) static int get_slabstat(struct slabstat *s)
{ {
char buf[256]; char buf[256];
FILE *fp; FILE *fp;
int cnt; int cnt;
static int slabstat_valid; 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) if (slabstat_valid)
return 0; return 0;