From: Paolo Bonzini Date: Wed, 4 Jan 2017 14:59:14 +0000 (+0100) Subject: block: remove dead check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=7ad2757feffd13b8000826ae3df2a3bc929d688d;p=qemu.git block: remove dead check 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 Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- diff --git a/block.c b/block.c index 39ddea3411..a0346c80c6 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 "