]> xenbits.xensource.com Git - libvirt.git/commit
qemu: replace multiple strcmps with a switch on an enum
authorLaine Stump <laine@laine.org>
Tue, 24 Sep 2013 13:38:32 +0000 (09:38 -0400)
committerLaine Stump <laine@laine.org>
Wed, 25 Sep 2013 14:37:33 +0000 (10:37 -0400)
commit8e0dab3a8e2e4b0c580739587fa4a474c7a4afc8
treeefdb92108862c188b55bae177e997a260746bc9a
parent07af519298996f4341f62542c31c1c01969eeceb
qemu: replace multiple strcmps with a switch on an enum

I'm not sure why this code was written to compare the strings that it
had just retrieved from an enum->string conversion, rather than just
look at the original enum values, but this yields the same results,
and is much more efficient (especially as you add more devices).

This is a prerequisite for patches to resolve:

   https://bugzilla.redhat.com/show_bug.cgi?id=1003983
src/qemu/qemu_command.c