mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 01:24:18 +00:00
Remove unnecessary return value of net_init
The return value is unused and always 0, as the function fails with an assertion instead of returning an error value.
This commit is contained in:
parent
286104cf08
commit
673b7facbe
|
@ -2209,16 +2209,12 @@ int net_would_block()
|
|||
#endif
|
||||
}
|
||||
|
||||
int net_init()
|
||||
void net_init()
|
||||
{
|
||||
#if defined(CONF_FAMILY_WINDOWS)
|
||||
WSADATA wsaData;
|
||||
int err = WSAStartup(MAKEWORD(1, 1), &wsaData);
|
||||
dbg_assert(err == 0, "network initialization failed.");
|
||||
return err == 0 ? 0 : 1;
|
||||
WSADATA wsa_data;
|
||||
dbg_assert(WSAStartup(MAKEWORD(1, 1), &wsa_data) == 0, "network initialization failed.");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if defined(CONF_FAMILY_UNIX)
|
||||
|
|
|
@ -879,11 +879,9 @@ typedef struct sockaddr_un UNIXSOCKETADDR;
|
|||
*
|
||||
* @ingroup Network-General
|
||||
*
|
||||
* @return 0 on success.
|
||||
*
|
||||
* @remark You must call this function before using any other network functions.
|
||||
*/
|
||||
int net_init();
|
||||
void net_init();
|
||||
|
||||
/*
|
||||
Function: net_host_lookup
|
||||
|
|
Loading…
Reference in a new issue