[libvirt] [PATCH v2 04/15] qemu: Restrict scope in qemuBuildControllerDevStr()
Peter Krempa
pkrempa at redhat.com
Mon Feb 19 15:00:18 UTC 2018
On Fri, Feb 16, 2018 at 17:28:01 +0100, Andrea Bolognani wrote:
> Some variables are only used for PCI controllers, and we're going
> to add more soon. We can declare them in the 'case' scope rather
> than in the function scope to make it a bit nicer.
>
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
> src/qemu/qemu_command.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 5e4dfcf75..2291bf5da 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -2625,8 +2625,6 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
> {
> virBuffer buf = VIR_BUFFER_INITIALIZER;
> int address_type = def->info.type;
> - const virDomainPCIControllerOpts *pciopts;
> - const char *modelName = NULL;
>
> *devstr = NULL;
Since the next patch changes both lines again I suggest you squash it
into the next patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180219/646c11a2/attachment-0001.sig>
More information about the libvir-list
mailing list