[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block: remove dead check
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] block: remove dead check |
Date: |
Wed, 4 Jan 2017 11:36:39 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
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 <address@hidden>
> ---
> block.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Eric Blake <address@hidden>
>
> 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
signature.asc
Description: OpenPGP digital signature