diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-09-27 08:20:20 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2015-09-27 08:20:20 +0200 |
commit | e94622c319e4307617b202f19d3ec05b21a9bb49 (patch) | |
tree | c5ddf44352b9bd47aeb3eb432ba79638079efe25 /backend/epsonds.c | |
parent | 6f2255c9648b175d51e2c8e5e9670557f9dc4ee1 (diff) |
merge to 1.0.25+git20150927
Diffstat (limited to 'backend/epsonds.c')
-rw-r--r-- | backend/epsonds.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/backend/epsonds.c b/backend/epsonds.c index 8db070b..2f85312 100644 --- a/backend/epsonds.c +++ b/backend/epsonds.c @@ -330,10 +330,11 @@ static SANE_Status attach(const char *name, int type) { SANE_Status status; + epsonds_scanner * s; DBG(7, "%s: devname = %s, type = %d\n", __func__, name, type); - epsonds_scanner *s = device_detect(name, type, &status); + s = device_detect(name, type, &status); if (s == NULL) return status; @@ -1041,6 +1042,7 @@ sane_start(SANE_Handle handle) { epsonds_scanner *s = (epsonds_scanner *)handle; char buf[64]; + char cmd[100]; /* take care not to overflow */ SANE_Status status = 0; s->pages++; @@ -1103,8 +1105,6 @@ sane_start(SANE_Handle handle) /* set scanning parameters */ - char cmd[100]; /* take care not to overflow */ - /* document source */ if (strcmp(source_list[s->val[OPT_SOURCE].w], ADF_STR) == 0) { @@ -1194,6 +1194,7 @@ sane_read(SANE_Handle handle, SANE_Byte *data, SANE_Int max_length, SANE_Int *length) { SANE_Int read = 0, tries = 3; + SANE_Int available; SANE_Status status = 0; epsonds_scanner *s = (epsonds_scanner *)handle; @@ -1208,7 +1209,7 @@ sane_read(SANE_Handle handle, SANE_Byte *data, SANE_Int max_length, } /* anything in the buffer? pass it to the frontend */ - SANE_Int available = eds_ring_avail(s->current); + available = eds_ring_avail(s->current); if (available) { DBG(18, "reading from ring buffer, %d left\n", available); |