mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 01:55:39 +00:00
Fix 2 kernel32:environ tests.
The GetComputerNameEx ComputerNameDnsDomain tests can't succeed if we have no domain, as the function succeeds querying a zero length domain into a zero length buffer. svn path=/trunk/; revision=41404
This commit is contained in:
parent
ca19857e83
commit
14be0d32cb
1 changed files with 10 additions and 2 deletions
|
@ -286,7 +286,11 @@ BOOL
|
|||
WINAPI
|
||||
GetComputerNameA(LPSTR lpBuffer, LPDWORD lpnSize)
|
||||
{
|
||||
return GetComputerNameExA(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
BOOL ret;
|
||||
ret = GetComputerNameExA(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
if(!ret && GetLastError() == ERROR_MORE_DATA)
|
||||
SetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -297,7 +301,11 @@ BOOL
|
|||
WINAPI
|
||||
GetComputerNameW(LPWSTR lpBuffer, LPDWORD lpnSize)
|
||||
{
|
||||
return GetComputerNameExW(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
BOOL ret;
|
||||
ret=GetComputerNameExW(ComputerNameNetBIOS, lpBuffer, lpnSize);
|
||||
if(!ret && GetLastError() == ERROR_MORE_DATA)
|
||||
SetLastError(ERROR_BUFFER_OVERFLOW);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue