mirror of
https://git.proxmox.com/git/mirror_iproute2
synced 2025-10-05 01:50:38 +00:00
ss: Make tmr_name local to tcp_timer_print()
It's used only there, so no need to have it globally defined. Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
parent
0cb74a8610
commit
86dfa1be4a
18
misc/ss.c
18
misc/ss.c
@ -888,15 +888,6 @@ static void sock_addr_print(const char *addr, char *delim, const char *port,
|
|||||||
sock_addr_print_width(addr_width, addr, delim, serv_width, port, ifname);
|
sock_addr_print_width(addr_width, addr, delim, serv_width, port, ifname);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *tmr_name[] = {
|
|
||||||
"off",
|
|
||||||
"on",
|
|
||||||
"keepalive",
|
|
||||||
"timewait",
|
|
||||||
"persist",
|
|
||||||
"unknown"
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *print_ms_timer(int timeout)
|
static const char *print_ms_timer(int timeout)
|
||||||
{
|
{
|
||||||
static char buf[64];
|
static char buf[64];
|
||||||
@ -2006,6 +1997,15 @@ static void tcp_stats_print(struct tcpstat *s)
|
|||||||
|
|
||||||
static void tcp_timer_print(struct tcpstat *s)
|
static void tcp_timer_print(struct tcpstat *s)
|
||||||
{
|
{
|
||||||
|
static const char * const tmr_name[] = {
|
||||||
|
"off",
|
||||||
|
"on",
|
||||||
|
"keepalive",
|
||||||
|
"timewait",
|
||||||
|
"persist",
|
||||||
|
"unknown"
|
||||||
|
};
|
||||||
|
|
||||||
if (s->timer) {
|
if (s->timer) {
|
||||||
if (s->timer > 4)
|
if (s->timer > 4)
|
||||||
s->timer = 5;
|
s->timer = 5;
|
||||||
|
Loading…
Reference in New Issue
Block a user