On Wed, 2005-10-19 at 12:08 +0200, Martin Pitt wrote:
> Hi Jeffrey!
> 
> The CVS head/1.5.3 distribution loop in hal_device_added() is flawed
> since "j" is only initialized to 0 in the outer loop (over i) and
> never set back to 0.

it's not supposed to be set back to 0

>  This means that only the first item in devices[]
> (which happens to be the most popular "block" capability) is executed,
> it does not work for all subsequent loops. 

try it, I think you'll find it works as intended :)

The loop is actually explained in my blog:
http://primates.ximian.com/~fejj/blog/archives/000033.html

> 
> Doing 1.5 loops in one for() construct is also a bit confusing, so I cleaned
> this up a little and made it work for all devices[] entries. (Patch attached)

eh, it's "confusing" but in a fun way :)

-- 
Jeffrey Stedfast
Evolution Hacker - Novell, Inc.
[EMAIL PROTECTED]  - www.novell.com

_______________________________________________
utopia-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/utopia-list

Reply via email to