Map getlogin_r()'s ERANGE to ERROR_GEN_FAILURE
ERROR_INSUFFICIENT_BUFFER should never occur here and would be a misleading error for the user.
This commit is contained in:
parent
f8e9dfde8c
commit
665f8f1e87
1 changed files with 1 additions and 1 deletions
|
@ -96,7 +96,7 @@ BOOL GetUserNameW(WCHAR_T* lpBuffer, LPDWORD lpnSize)
|
||||||
errno = ERROR_NO_ASSOCIATION;
|
errno = ERROR_NO_ASSOCIATION;
|
||||||
break;
|
break;
|
||||||
case ERANGE:
|
case ERANGE:
|
||||||
errno = ERROR_INSUFFICIENT_BUFFER;
|
errno = ERROR_GEN_FAILURE;
|
||||||
break;
|
break;
|
||||||
case ENOENT:
|
case ENOENT:
|
||||||
errno = ERROR_NO_SUCH_USER;
|
errno = ERROR_NO_SUCH_USER;
|
||||||
|
|
Loading…
Reference in a new issue