maxlen = h->pnm_image->size - h->read_info->read_size;
// read image
- if (h->pnm_image->data != NULL) {
- int skip_header_bytes = _sane_kds_s2000w_net_find_first_data_byte(h->pnm_image->data);
- if (h->read_info->read_size <= 0)
- h->read_info->read_size += skip_header_bytes;
- }
+ if (h->pnm_image->data != NULL && h->read_info->read_size <= 0)
+ h->read_info->read_size += _sane_kds_s2000w_net_find_first_data_byte(h->pnm_image->data);
*length = maxlen;
memcpy(data, h->pnm_image->data + h->read_info->read_size, *length);