From 9634d9031c140b24c7ca0d8872632207f6ce7275 Mon Sep 17 00:00:00 2001 From: blueswir1 Date: Fri, 26 Oct 2007 19:01:16 +0000 Subject: Use const and static as needed, disable unused code git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3452 c046a42c-6fe2-441c-8c8c-71466251a162 --- slirp/tcp_output.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'slirp/tcp_output.c') diff --git a/slirp/tcp_output.c b/slirp/tcp_output.c index f4986516a3..dba4ed7a51 100644 --- a/slirp/tcp_output.c +++ b/slirp/tcp_output.c @@ -48,14 +48,14 @@ * Since this is only used in "stats socket", we give meaning * names instead of the REAL names */ -char *tcpstates[] = { +const char * const tcpstates[] = { /* "CLOSED", "LISTEN", "SYN_SENT", "SYN_RCVD", */ "REDIRECT", "LISTEN", "SYN_SENT", "SYN_RCVD", "ESTABLISHED", "CLOSE_WAIT", "FIN_WAIT_1", "CLOSING", "LAST_ACK", "FIN_WAIT_2", "TIME_WAIT", }; -u_char tcp_outflags[TCP_NSTATES] = { +static const u_char tcp_outflags[TCP_NSTATES] = { TH_RST|TH_ACK, 0, TH_SYN, TH_SYN|TH_ACK, TH_ACK, TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_FIN|TH_ACK, TH_ACK, TH_ACK, @@ -354,7 +354,7 @@ send: error = 1; goto out; } - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; m->m_len = hdrlen; /* @@ -396,7 +396,7 @@ send: error = 1; goto out; } - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; m->m_len = hdrlen; } @@ -536,7 +536,7 @@ send: ((struct ip *)ti)->ip_len = m->m_len; - ((struct ip *)ti)->ip_ttl = ip_defttl; + ((struct ip *)ti)->ip_ttl = IPDEFTTL; ((struct ip *)ti)->ip_tos = so->so_iptos; /* #if BSD >= 43 */ -- cgit v1.2.3