summaryrefslogtreecommitdiff
path: root/backend/magicolor.c
diff options
context:
space:
mode:
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);