[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] check NULL opts in qemu_opt_get functions
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH] check NULL opts in qemu_opt_get functions |
Date: |
Thu, 19 Jun 2014 11:34:11 +0800 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Jun 18, 2014 at 10:47:26AM +0800, Chunyan Liu wrote:
> Some places will call bdrv_create_file(filename, NULL, &local_err), where
> opts is NULL. Check NULL in qemu_opt_get and qemu_opt_get_*_del functions,
> to avoid extra effort of checking opts before calling them every time.
>
> Signed-off-by: Chunyan Liu <address@hidden>
> ---
> Fix reported bugs:
> http://lists.gnu.org/archive/html/qemu-devel/2014-06/msg03866.html
>
> ---
> util/qemu-option.c | 28 ++++++++++++++++++++++++----
> 1 file changed, 24 insertions(+), 4 deletions(-)
A subset of QemuOpts functions access NULL opts while others do not, but
that was already the case before this patch. So this patch looks good
to me.
Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block
Stefan
pgpFZ5aUj6LiD.pgp
Description: PGP signature