summaryrefslogtreecommitdiff
path: root/backend/magicolor.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-03-30 21:30:45 +0200
commitee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch)
tree58f05092be1a17a939e861f8cadcda1b6ca2ecef /backend/magicolor.c
parent0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff)
parentfef76e17ed4c607ea73b81279f9ef1d7121be900 (diff)
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'backend/magicolor.c')
-rw-r--r--backend/magicolor.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/backend/magicolor.c b/backend/magicolor.c
index d3af142..af9fb1a 100644
--- a/backend/magicolor.c
+++ b/backend/magicolor.c
@@ -1288,9 +1288,10 @@ mc_scan_finish(Magicolor_Scanner * s)
status = cmd_finish_scan (s);
status = cmd_request_error(s);
- if (status != SANE_STATUS_GOOD)
+ if (status != SANE_STATUS_GOOD) {
cmd_cancel_scan (s);
return status;
+ }
/* XXX required? */
/* TODO: cmd_reset(s);*/
@@ -2050,7 +2051,7 @@ mc_network_discovery(const char*host)
fd_set fdset;
DBG(1, " loop=%d\n", i++);
timeout.tv_sec = 0;
- /* Use a 125ms timeout for select. If we get a response,
+ /* Use a 125ms timeout for select. If we get a response,
* the loop will be entered earlier again, anyway */
timeout.tv_usec = 125000;
FD_ZERO (&fdset);
@@ -2193,7 +2194,7 @@ attach_one_config(SANEI_Config __sane_unused__ *config, const char *line)
/* Timeout for all other read requests */
DBG(50, "%s: Request timeout set to %d\n", __func__, timeout);
MC_Request_Timeout = timeout;
-
+
} else {
/* TODO: Warning about unparsable line! */
}
@@ -2414,7 +2415,7 @@ init_options(Magicolor_Scanner *s)
s->opt[OPT_SOURCE].constraint_type = SANE_CONSTRAINT_STRING_LIST;
s->opt[OPT_SOURCE].constraint.string_list = source_list;
s->val[OPT_SOURCE].w = 0; /* always use Flatbed as default */
-
+
s->opt[OPT_ADF_MODE].name = "adf-mode";
s->opt[OPT_ADF_MODE].title = SANE_I18N("ADF Mode");
s->opt[OPT_ADF_MODE].desc =
@@ -2788,12 +2789,11 @@ setvalue(SANE_Handle handle, SANE_Int option, void *value, SANE_Int *info)
case OPT_BR_X:
case OPT_BR_Y:
- sval->w = *((SANE_Word *) value);
- if (SANE_UNFIX(sval->w) == 0) {
+ if (SANE_UNFIX(*((SANE_Word *) value)) == 0) {
DBG(17, "invalid br-x or br-y\n");
return SANE_STATUS_INVAL;
}
- /* passthru */
+ // fall through
case OPT_TL_X:
case OPT_TL_Y:
sval->w = *((SANE_Word *) value);