summaryrefslogtreecommitdiff
path: root/backend/epsonds.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/epsonds.c
parent0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff)
parentfef76e17ed4c607ea73b81279f9ef1d7121be900 (diff)
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'backend/epsonds.c')
-rw-r--r--backend/epsonds.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/backend/epsonds.c b/backend/epsonds.c
index 218e08c..ff5d681 100644
--- a/backend/epsonds.c
+++ b/backend/epsonds.c
@@ -41,6 +41,12 @@
#include "sane/config.h"
#include <ctype.h>
+#ifdef HAVE_SYS_SELECT_H
+#include <sys/select.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
#include <unistd.h>
#include "sane/saneopts.h"
@@ -1044,12 +1050,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);