All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] block: Remove redundant assertion
Date: Tue, 27 Aug 2013 18:07:02 +0200	[thread overview]
Message-ID: <521CCEA6.4070002@weilnetz.de> (raw)
In-Reply-To: <1377618961-30439-1-git-send-email-kwolf@redhat.com>

Am 27.08.2013 17:56, schrieb Kevin Wolf:
> The failing condition is checked immediately before the assertion, so
> keeping the assertion is kind of redundant.

Are you sure that it is not the check which is redundant?
Is file == NULL allowed in this 'else' branch?

Regards,
Stefan

>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
>  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);
>      }

  reply	other threads:[~2013-08-27 16:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 15:56 [Qemu-devel] [PATCH] block: Remove redundant assertion Kevin Wolf
2013-08-27 16:07 ` Stefan Weil [this message]
2013-08-28  7:54   ` Kevin Wolf

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=521CCEA6.4070002@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.