From patchwork Tue Jan 24 09:39:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 719117 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3v77G20t3Vz9t0G for ; Tue, 24 Jan 2017 23:46:02 +1100 (AEDT) Received: from localhost ([::1]:48482 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cW0U3-0003qE-KY for incoming@patchwork.ozlabs.org; Tue, 24 Jan 2017 07:45:59 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVzqF-0000fL-Q0 for qemu-devel@nongnu.org; Tue, 24 Jan 2017 07:04:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cVzqC-00006C-IF for qemu-devel@nongnu.org; Tue, 24 Jan 2017 07:04:51 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:45169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cVzqC-00005T-As; Tue, 24 Jan 2017 07:04:48 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 07AD44212F; Tue, 24 Jan 2017 15:04:48 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with SMTP id 10EDB568; Tue, 24 Jan 2017 12:39:43 +0300 (MSK) Received: (nullmailer pid 12636 invoked by uid 1000); Tue, 24 Jan 2017 09:39:41 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Tue, 24 Jan 2017 12:39:18 +0300 Message-Id: <9fcf8d63ea603736391d0508c08e0a50e4a2c091.1485250702.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 14/31] block: remove dead check X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Paolo Bonzini , Michael Tokarev Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Paolo Bonzini 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 --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 "