diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-26 19:01:16 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-10-26 19:01:16 +0000 |
commit | 9634d9031c140b24c7ca0d8872632207f6ce7275 (patch) | |
tree | 34ba241de1f12fcbd4e3301f081c50ff2db654da /slirp/tcp_output.c | |
parent | 31a60e22752d3daaa248ca10930f3cf4bc5f02e8 (diff) | |
download | qemu-9634d9031c140b24c7ca0d8872632207f6ce7275.zip qemu-9634d9031c140b24c7ca0d8872632207f6ce7275.tar.gz qemu-9634d9031c140b24c7ca0d8872632207f6ce7275.tar.bz2 |
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
Diffstat (limited to 'slirp/tcp_output.c')
-rw-r--r-- | slirp/tcp_output.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/slirp/tcp_output.c b/slirp/tcp_output.c index f498651..dba4ed7 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 */ |