From patchwork Tue Aug 27 15:56:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 270149 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E30AE2C00DB for ; Wed, 28 Aug 2013 01:56:24 +1000 (EST) Received: from localhost ([::1]:57178 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELd1-0000CO-5g for incoming@patchwork.ozlabs.org; Tue, 27 Aug 2013 11:56:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELcc-000086-5g for qemu-devel@nongnu.org; Tue, 27 Aug 2013 11:56:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VELcV-000368-JQ for qemu-devel@nongnu.org; Tue, 27 Aug 2013 11:55:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELcV-000362-8C for qemu-devel@nongnu.org; Tue, 27 Aug 2013 11:55:51 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7RFto2v023460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 27 Aug 2013 11:55:50 -0400 Received: from dhcp-200-207.str.redhat.com (dhcp-192-197.str.redhat.com [10.33.192.197]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r7RFtnuK019492; Tue, 27 Aug 2013 11:55:49 -0400 From: Kevin Wolf To: qemu-devel@nongnu.org Date: Tue, 27 Aug 2013 17:56:01 +0200 Message-Id: <1377618961-30439-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com Subject: [Qemu-devel] [PATCH] block: Remove redundant assertion X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The failing condition is checked immediately before the assertion, so keeping the assertion is kind of redundant. Signed-off-by: Kevin Wolf --- block.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block.c b/block.c index a387c1a..26639e8 100644 --- a/block.c +++ b/block.c @@ -743,7 +743,6 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file, ret = -EINVAL; goto free_and_fail; } - assert(file != NULL); bs->file = file; ret = drv->bdrv_open(bs, options, open_flags); }