Christian Inci chris.pcguy.inci@gmail.com writes:
@@ -149,6 +149,12 @@ BOOL WINAPI GetUserProfileDirectoryW( HANDLE hToken, LPWSTR lpProfileDir,
TRACE( "%p %p %p\n", hToken, lpProfileDir, lpcchSize );
- if (!hToken)
- {
SetLastError( ERROR_INVALID_HANDLE );
return FALSE;
- }
There's no reason to treat a 0 handle differently. Please stop adding such special cases just to satisfy the tests. Parameter checking needs to fall out of the implementation.