hp5400: small enhancement from review to reduce code and increase clarity.

fix-build-obselete-jpeg
Ralph Little 2020-03-03 09:56:39 -08:00
rodzic 4948130f7c
commit 4f6b7665a8
1 zmienionych plików z 1 dodań i 5 usunięć

Wyświetl plik

@ -812,11 +812,7 @@ sane_control_option (SANE_Handle h, SANE_Int n, SANE_Action Action,
{
for (SANE_Int resIdx = 1; resIdx <= setResolutions[0]; resIdx++)
{
if (dpiValue == setResolutions[resIdx])
{
break;
}
else if (dpiValue < setResolutions[resIdx])
if (dpiValue <= setResolutions[resIdx])
{
dpiValue = setResolutions[resIdx];
break;