qemu: Simplify modelName stringification
There's no need to perform checks before conversion, we can just
call virDomainControllerPCIModelNameTypeToString() and check the
results later on.
Since the variables involved are only used for PCI controllers,
we can declare them in the 'case' scope rather than in the
function scope to make everything a bit nicer while at it.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
Showing
想要评论请 注册 或 登录