Commit 42388a77 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

net_Close() is a one-liner, so inline it

parent b5ed36d3
...@@ -198,6 +198,12 @@ int poll (struct pollfd *fds, unsigned nfds, int timeout); ...@@ -198,6 +198,12 @@ int poll (struct pollfd *fds, unsigned nfds, int timeout);
# define net_StopRecv( fd ) (void)0 # define net_StopRecv( fd ) (void)0
#endif #endif
#ifdef WIN32
# define net_Close( fd ) closesocket ((SOCKET)fd)
#else
# define net_Close( fd ) close (fd)
#endif
/* Portable network names/addresses resolution layer */ /* Portable network names/addresses resolution layer */
/* GAI error codes */ /* GAI error codes */
......
...@@ -265,23 +265,6 @@ int net_ListenSingle (vlc_object_t *obj, const char *host, int port, ...@@ -265,23 +265,6 @@ int net_ListenSingle (vlc_object_t *obj, const char *host, int port,
/*****************************************************************************
* __net_Close:
*****************************************************************************
* Close a network handle
*****************************************************************************/
void net_Close (int fd)
{
#ifdef UNDER_CE
CloseHandle ((HANDLE)fd);
#elif defined (WIN32)
closesocket (fd);
#else
(void)close (fd);
#endif
}
static ssize_t static ssize_t
net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv, net_ReadInner (vlc_object_t *restrict p_this, unsigned fdc, const int *fdv,
const v_socket_t *const *restrict vsv, const v_socket_t *const *restrict vsv,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment