kopia lustrzana https://gitlab.com/sane-project/backends
epjitsu: optimize loop
Signed-off-by: Hiroshi Miura <miurahr@linux.com>merge-requests/1/head
rodzic
9f1542afc6
commit
f3d5455e9a
|
@ -1791,7 +1791,12 @@ change_params(struct scanner *s)
|
|||
do {
|
||||
if(settings[i].model == s->model
|
||||
&& settings[i].x_res == s->resolution_x
|
||||
&& settings[i].usb_power == s->usb_power){
|
||||
&& settings[i].usb_power == s->usb_power)
|
||||
{
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
} while (settings[i].model);
|
||||
|
||||
/*pull in closest y resolution*/
|
||||
s->resolution_y = settings[i].y_res;
|
||||
|
@ -1821,11 +1826,6 @@ change_params(struct scanner *s)
|
|||
s->setWindowScan = settings[i].sw_scan;
|
||||
s->setWindowScanLen = SET_WINDOW_LEN;
|
||||
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
} while (settings[i].model);
|
||||
|
||||
if (!settings[i].model)
|
||||
{
|
||||
return SANE_STATUS_INVAL;
|
||||
|
|
Ładowanie…
Reference in New Issue