netapi32: Get rid of an ugly macro definition only used once.

This commit is contained in:
Kai Blin 2007-03-18 22:13:28 +01:00 committed by Alexandre Julliard
parent b3910387ec
commit 5f8a14d5e2
1 changed files with 6 additions and 9 deletions

View File

@ -88,14 +88,6 @@ static BOOL NETAPI_IsKnownUser(LPCWSTR UserName)
return Result;
}
#define NETAPI_ForceKnownUser(UserName, FailureCode) \
if (!NETAPI_IsKnownUser(UserName)) \
{ \
TRACE("Can't find information for user %s\n", \
debugstr_w(UserName)); \
return FailureCode; \
}
/************************************************************
* NetUserAdd (NETAPI32.@)
*/
@ -152,7 +144,12 @@ NetUserGetInfo(LPCWSTR servername, LPCWSTR username, DWORD level,
if (status != NERR_Success)
return status;
NETAPI_ForceLocalComputer(servername, NERR_InvalidComputer);
NETAPI_ForceKnownUser(username, NERR_UserNotFound);
if(!NETAPI_IsKnownUser(username))
{
TRACE("User %s is unknown.\n", debugstr_w(username));
return NERR_UserNotFound;
}
switch (level)
{