[sane-devel] Fix for infinte for loop
Hans Petter Selasky
hselasky at c2i.net
Fri Jul 8 09:09:15 UTC 2011
--- /sane-backends-1.0.21/backend/genesys_gl646.c.orig 2011-07-08 11:07:05.000000000 +0200
+++ /sane-backends-1.0.21/backend/genesys_gl646.c 2011-07-08 11:07:47.000000000 +0200
@@ -3068,9 +3068,10 @@
/* loop until head parked */
if (wait_until_home)
{
- int loop = 0;
+ int loop;
- while (loop < 3) /* do not wait longer then 30 seconds */
+ /* do not wait longer then 30 seconds */
+ for (loop = 0; loop < 300; loop++)
{
status = sanei_genesys_get_status (dev, &val);
if (status != SANE_STATUS_GOOD)
I'm not suscribed to this list. Please keep me CC'ed.
--HPS
More information about the sane-devel
mailing list