qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: remove dead check
Date: Wed, 4 Jan 2017 11:36:39 -0600	[thread overview]
Message-ID: <8467bc31-f5ac-3d8e-483c-a6d8199d45bc@redhat.com> (raw)
In-Reply-To: <20170104145914.3361-1-pbonzini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

On 01/04/2017 08:59 AM, Paolo Bonzini wrote:
> options must be non-NULL here, because a NULL value is replaced with
> qdict_new earlier in the function.  Reported by Coverity.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  block.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block.c b/block.c
> index 39ddea3..a0346c8 100644
> --- a/block.c
> +++ b/block.c
> @@ -1851,7 +1851,7 @@ static BlockDriverState *bdrv_open_inherit(const char *filename,
>      bdrv_refresh_filename(bs);
>  
>      /* Check if any unknown options were used */
> -    if (options && (qdict_size(options) != 0)) {
> +    if (qdict_size(options) != 0) {
>          const QDictEntry *entry = qdict_first(options);
>          if (flags & BDRV_O_PROTOCOL) {
>              error_setg(errp, "Block protocol '%s' doesn't support the option "
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2017-01-04 17:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 14:59 [Qemu-devel] [PATCH] block: remove dead check Paolo Bonzini
2017-01-04 17:36 ` Eric Blake [this message]
2017-01-12 10:55 ` Michael Tokarev

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=8467bc31-f5ac-3d8e-483c-a6d8199d45bc@redhat.com \
    --to=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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).