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/socket.c | |
parent | 31a60e22752d3daaa248ca10930f3cf4bc5f02e8 (diff) |
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/socket.c')
-rw-r--r-- | slirp/socket.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/slirp/socket.c b/slirp/socket.c index 7e07cf8942..0c15132eae 100644 --- a/slirp/socket.c +++ b/slirp/socket.c @@ -13,12 +13,16 @@ #include <sys/filio.h> #endif -void +static void sofcantrcvmore(struct socket *so); +static void sofcantsendmore(struct socket *so); + +#if 0 +static void so_init() { /* Nothing yet */ } - +#endif struct socket * solookup(head, laddr, lport, faddr, fport) @@ -421,7 +425,7 @@ sorecvfrom(so) int len, n; if (!(m = m_get())) return; - m->m_data += if_maxlinkhdr; + m->m_data += IF_MAXLINKHDR; /* * XXX Shouldn't FIONREAD packets destined for port 53, @@ -604,12 +608,13 @@ solisten(port, laddr, lport, flags) return so; } +#if 0 /* * Data is available in so_rcv * Just write() the data to the socket * XXX not yet... */ -void +static void sorwakeup(so) struct socket *so; { @@ -622,12 +627,13 @@ sorwakeup(so) * We have room for a read() if we want to * For now, don't read, it'll be done in the main loop */ -void +static void sowwakeup(so) struct socket *so; { /* Nothing, yet */ } +#endif /* * Various session state calls @@ -652,9 +658,8 @@ soisfconnected(so) so->so_state |= SS_ISFCONNECTED; /* Clobber other states */ } -void -sofcantrcvmore(so) - struct socket *so; +static void +sofcantrcvmore(struct socket *so) { if ((so->so_state & SS_NOFDREF) == 0) { shutdown(so->s,0); @@ -669,9 +674,8 @@ sofcantrcvmore(so) so->so_state |= SS_FCANTRCVMORE; } -void -sofcantsendmore(so) - struct socket *so; +static void +sofcantsendmore(struct socket *so) { if ((so->so_state & SS_NOFDREF) == 0) { shutdown(so->s,1); /* send FIN to fhost */ |