[NtUser] Unnecessary check is removed and correct value of an error code is returned

* Fixes 2 tests for win32knt_apitest:NtUserEnumDisplaySettings

svn path=/trunk/; revision=72649
This commit is contained in:
Dmitry Chapyshev 2016-09-10 22:30:53 +00:00
parent 0bbd5c592b
commit 50ce1f1694

View file

@ -477,9 +477,6 @@ UserEnumDisplaySettings(
return STATUS_UNSUCCESSFUL; return STATUS_UNSUCCESSFUL;
} }
if (iModeNum >= pGraphicsDevice->cDevModes)
return STATUS_NO_MORE_ENTRIES;
iFoundMode = 0; iFoundMode = 0;
for (i = 0; i < pGraphicsDevice->cDevModes; i++) for (i = 0; i < pGraphicsDevice->cDevModes; i++)
{ {
@ -504,7 +501,7 @@ UserEnumDisplaySettings(
} }
/* Nothing was found */ /* Nothing was found */
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER_2;
} }
NTSTATUS NTSTATUS