From: Stefan Hajnoczi <stefanha@gmail.com>
To: Chunyan Liu <cyliu@suse.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] check NULL opts in qemu_opt_get functions
Date: Thu, 19 Jun 2014 11:34:11 +0800 [thread overview]
Message-ID: <20140619033411.GB21236@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1403059646-4161-1-git-send-email-cyliu@suse.com>
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
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 <cyliu@suse.com>
> ---
> 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
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2014-06-19 3:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 2:47 [Qemu-devel] [PATCH] check NULL opts in qemu_opt_get functions Chunyan Liu
2014-06-18 4:04 ` Eric Blake
2014-06-19 3:34 ` Stefan Hajnoczi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140619033411.GB21236@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=cyliu@suse.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).