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:
Robert Müller 2023-09-16 13:37:53 +02:00
parent 286104cf08
commit 673b7facbe
2 changed files with 4 additions and 10 deletions

View file

@ -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)

View file

@ -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