Fixed bugs revealed by LGTM.com (on port to CUPS)
This especially revealed that on selecting the final setting for the
color mode/quality presets only 2 of the intended 3 passes were done.
@@ -2568,8 +2568,6 @@ ppdCacheAssignPresets(ppd_file_t *ppd,
// No or small change -> Normal quality
if (m == 1)
properties->sets_normal += res_factor * 4;
- else if (m > 1 && m < 2)
- properties->sets_normal += res_factor * 2;
// At least double the pixels -> High quality
else if (m == 2)
properties->sets_high += res_factor * 3;
@@ -2587,8 +2585,6 @@ ppdCacheAssignPresets(ppd_file_t *ppd,
// No or small change -> Normal quality
if (m == 1)
properties->sets_normal += res_factor * 1;
- else if (m > 1 && m < 2)
- properties->sets_normal += res_factor * 1;
// At most half the pixels -> Draft quality
else if (m == 2)
properties->sets_draft += res_factor * 3;
@@ -2615,7 +2611,7 @@ ppdCacheAssignPresets(ppd_file_t *ppd,
* grid
*/
- for (pass = 0; pass < 2; pass ++)
+ for (pass = 0; pass < 3; pass ++)
{
for (k = 0; k < option->num_choices; k ++)
{
