qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v22 12/25] qcow2.c: replace QEMUOptionParameter


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v22 12/25] qcow2.c: replace QEMUOptionParameter with QemuOpts
Date: Tue, 11 Mar 2014 15:22:36 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Mar 10, 2014 at 03:31:48PM +0800, Chunyan Liu wrote:
> @@ -1622,11 +1622,11 @@ out:
>      return ret;
>  }
>  
> -static int qcow2_create(const char *filename, QEMUOptionParameter *options,
> -                        Error **errp)
> +static int qcow2_create(const char *filename, QemuOpts *opts, Error **errp)
>  {
> -    const char *backing_file = NULL;
> -    const char *backing_fmt = NULL;
> +    char *backing_file = NULL;
> +    char *backing_fmt = NULL;
> +    char *buf;

It wouldn't hurt to initialize buf to NULL.  That way there is no chance
of introducing a bug by jumping to the error path before buf has been
initialized.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]