/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS WinSock 2 DLL
- * FILE: misc/ns.c
+ * FILE: dll/win32/ws2_32/misc/ns.c
* PURPOSE: Namespace APIs
* PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
* REVISIONS:
p = (PCHAR)cp;
- if (!p || !WSAINITIALIZED)
+ if (!p)
{
WSASetLastError(WSAEFAULT);
return INADDR_NONE;
struct sockaddr_in *sin;
INT error;
- if (res == NULL)
+ if (!WSAINITIALIZED)
{
- error = WSAEINVAL;
+ error = WSANOTINITIALISED;
goto End;
}
+
+ *res = NULL;
+
if (nodename == NULL && servname == NULL)
{
error = WSAHOST_NOT_FOUND;
goto End;
}
- if (!WSAINITIALIZED)
- {
- error = WSANOTINITIALISED;
- goto End;
- }
-
if (servname)
{
/* converting port number */