From f486e37faed7acefe6c886d194bfb382f0ab68bd Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 8 Apr 2009 22:39:02 +0200 Subject: [PATCH] tcp_{debug,timer}.h & protosw.h: Constify some strings. --- sys/netinet/tcp_debug.h | 2 +- sys/netinet/tcp_timer.h | 2 +- sys/sys/protosw.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/netinet/tcp_debug.h b/sys/netinet/tcp_debug.h index 81fc6fd1af..ecb846e580 100644 --- a/sys/netinet/tcp_debug.h +++ b/sys/netinet/tcp_debug.h @@ -85,7 +85,7 @@ struct tcp_debug { #define TA_DROP 4 #ifdef TANAMES -static char *tanames[] = +static const char *tanames[] = { "input", "output", "user", "respond", "drop" }; #endif diff --git a/sys/netinet/tcp_timer.h b/sys/netinet/tcp_timer.h index bb2e78fd42..f3cfc96458 100644 --- a/sys/netinet/tcp_timer.h +++ b/sys/netinet/tcp_timer.h @@ -113,7 +113,7 @@ #define TCPTV_DELACK (hz / PR_FASTHZ / 2) /* 100ms timeout */ #ifdef TCPTIMERS -static char *tcptimers[] = +static const char *tcptimers[] = { "REXMT", "PERSIST", "KEEP", "2MSL" }; #endif diff --git a/sys/sys/protosw.h b/sys/sys/protosw.h index 4d971f1315..e9d060941c 100644 --- a/sys/sys/protosw.h +++ b/sys/sys/protosw.h @@ -174,7 +174,7 @@ struct protosw { #define PRU_NREQ 26 #ifdef PRUREQUESTS -char *prurequests[] = { +const char *prurequests[] = { "ATTACH", "DETACH", "BIND", "LISTEN", "CONNECT", "ACCEPT", "DISCONNECT", "SHUTDOWN", "RCVD", "SEND", "ABORT", "CONTROL", @@ -370,7 +370,7 @@ struct lwkt_port *sync_soport(struct socket *, struct sockaddr *, ((cmd) >= PRC_REDIRECT_NET && (cmd) <= PRC_REDIRECT_TOSHOST) #ifdef PRCREQUESTS -char *prcrequests[] = { +const char *prcrequests[] = { "IFDOWN", "ROUTEDEAD", "IFUP", "DEC-BIT-QUENCH2", "QUENCH", "MSGSIZE", "HOSTDEAD", "#7", "NET-UNREACH", "HOST-UNREACH", "PROTO-UNREACH", "PORT-UNREACH", @@ -399,7 +399,7 @@ char *prcrequests[] = { #define PRCO_NCMDS 2 #ifdef PRCOREQUESTS -char *prcorequests[] = { +const char *prcorequests[] = { "GETOPT", "SETOPT", }; #endif -- 2.41.0