[sane-devel] coolscan2 in 1.0.8

Frank Zago fzago@greshamstorage.com
Sat, 13 Apr 2002 18:05:26 -0500 (CDT)


Hi Andras,

A few comments:

- most private symbols are exported (functions and variables). You must
declare them as static.
- device_list is never freed. Actually most of the backend is leaking
memory. Overall I don't see the point in allocating every single
structure (for instance option_list could be a static member of cs2_t).
- there is two occurrences of exit(), which is not allowed.
- cs2_open() can leak file handles

And some suggestions:

- the backend does not have a man page.
- why don't you have a header file to store all those defines and
structures?
- in cs2_scanner_ready(), you should move the usleep a the end of the
while loop. Maybe this function need a full rewrite? And why it is
returning a value since only one caller checks for it?
- comments are scarse
- add a $Id:$ tag to keep track of the cvs version.

Best regards,
  Frank.