Daniel P. Berrange wrote:
Looking at the code, IMHO, the whole approach of iterating over the driver table soo many times is just wrong, when we can simply have an integer count recording how many drivers are registered. This eliminates both for(;;) loops, and reduces the amount of code to the point where I don't think there's anything to be gained by having a generic _virDriverRegister with all the type-casting this entails.
A kind of "Shlemiel the painter"[1] problem?
So how about the attached patch instead....
I think that looks better. Rich. [1] http://www.joelonsoftware.com/articles/fog0000000319.html -- Emerging Technologies, Red Hat http://et.redhat.com/~rjones/ 64 Baker Street, London, W1U 7DF Mobile: +44 7866 314 421 "[Negative numbers] darken the very whole doctrines of the equations and make dark of the things which are in their nature excessively obvious and simple" (Francis Maseres FRS, mathematician, 1759)
Attachment:
smime.p7s
Description: S/MIME Cryptographic Signature