]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
move readed variable to top
authorBastian Dehn <hhaalo@arcor.de>
Sat, 10 Feb 2024 11:46:46 +0000 (12:46 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 10 Feb 2024 11:46:46 +0000 (12:46 +0100)
src/kds_s2000w_net.c

index d81c489fa7b8d9b900c9eaf43d078f783b5eaa2d..51f2b1f82273e49fcb8134e9f3e5b128ee5479dd 100644 (file)
@@ -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)
 {