Remove useless conditionals which cause compiler warnings

These always evaluate to true in the context of the surrounding code.
merge-requests/701/head
David Ward 2022-03-08 19:00:00 -05:00
rodzic b3d105cba5
commit 0d032cd982
2 zmienionych plików z 35 dodań i 51 usunięć

Wyświetl plik

@ -581,13 +581,9 @@ hp_get_dev (const char *devname, HpDevice* devp)
DBG(3, "hp_get_dev: New device %s, connect-%s, scsi-request=%lu\n",
devname, connect, (unsigned long)info->config.use_scsi_request);
if (!ptr)
{
status = sanei_hp_device_new (&new, devname);
if ( status != SANE_STATUS_GOOD )
if (status != SANE_STATUS_GOOD)
return status;
}
if (devp)
*devp = new;

Wyświetl plik

@ -1523,8 +1523,6 @@ static SANE_Int hp3800_checkstable(SANE_Int lamp, struct st_checkstable *check)
SANE_Int rst = ERROR;
if (reg != NULL)
{
SANE_Int a;
SANE_Int count = sizeof(reg) / sizeof(struct st_reg);
@ -1537,7 +1535,6 @@ static SANE_Int hp3800_checkstable(SANE_Int lamp, struct st_checkstable *check)
break;
}
}
}
return rst;
}
@ -1560,8 +1557,6 @@ static SANE_Int hp3970_checkstable(SANE_Int lamp, struct st_checkstable *check)
SANE_Int rst = ERROR;
if (reg != NULL)
{
SANE_Int a;
SANE_Int count = sizeof(reg) / sizeof(struct st_reg);
@ -1574,7 +1569,6 @@ static SANE_Int hp3970_checkstable(SANE_Int lamp, struct st_checkstable *check)
break;
}
}
}
return rst;
}
@ -1597,8 +1591,6 @@ static SANE_Int hp4370_checkstable(SANE_Int lamp, struct st_checkstable *check)
SANE_Int rst = ERROR;
if (reg != NULL)
{
SANE_Int a;
SANE_Int count = sizeof(reg) / sizeof(struct st_reg);
@ -1611,7 +1603,6 @@ static SANE_Int hp4370_checkstable(SANE_Int lamp, struct st_checkstable *check)
break;
}
}
}
return rst;
}
@ -1634,8 +1625,6 @@ static SANE_Int ua4900_checkstable(SANE_Int lamp, struct st_checkstable *check)
SANE_Int rst = ERROR;
if (reg != NULL)
{
SANE_Int a;
SANE_Int count = sizeof(reg) / sizeof(struct st_reg);
@ -1648,7 +1637,6 @@ static SANE_Int ua4900_checkstable(SANE_Int lamp, struct st_checkstable *check)
break;
}
}
}
return rst;
}