From d7c0f2d5d55a601448be2ac96d85e8e943225da6 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Sat, 10 Feb 2024 12:46:46 +0100 Subject: [PATCH] move readed variable to top --- src/kds_s2000w_net.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/kds_s2000w_net.c b/src/kds_s2000w_net.c index d81c489..51f2b1f 100644 --- a/src/kds_s2000w_net.c +++ b/src/kds_s2000w_net.c @@ -12,6 +12,8 @@ int cancel = 0; metadata current_metadata; int read_size = 0; int scan_started = 0; +int readed_bytes_per_line = 0; +int readed_lines = 0; SANE_Status _sane_kds_s2000w_net_init(SANE_Int* version_code, SANE_Auth_Callback authorize) { @@ -205,6 +207,8 @@ SANE_Status _sane_kds_s2000w_net_get_parameters(SANE_Handle handle, params->lines = current_metadata.lines; params->depth = current_metadata.depth; read_size = 0; + readed_lines = 0; + readed_bytes_per_line = 0; return SANE_STATUS_GOOD; } @@ -220,9 +224,6 @@ SANE_Status _sane_kds_s2000w_net_start(SANE_Handle handle) return SANE_STATUS_GOOD; } -int readed_bytes_per_line = 0; -int readed_lines = 0; - SANE_Status _sane_kds_s2000w_net_read(SANE_Handle handle, SANE_Byte* data, SANE_Int max_length, SANE_Int* length) { -- 2.39.5