On Thu, Jul 22, 2010 at 05:17:35PM -0600, Eric Blake wrote: > On 07/22/2010 05:01 PM, Chris Wright wrote: > > The first conditional is always true which means the iterator will > > never find another device on the same bus. > > > > if (dev->domain != check->domain || > > dev->bus != check->bus || > > ----> (check->slot == check->slot && > > check->function == check->function)) <----- > > Ouch. ACK to the patch. Hmm, GCC should have warned about this if we had -Wlogical-op in our flags -Wlogical-op Warn when a logical operator is suspicously always evaluating to true or false Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list